Home › Forum › Problemi Vari con WP › Spaziatura dopo codice
-
AutorePost
-
-
4 Dicembre 2017 alle 20:20 #31638fabrixxPartecipante
Salve.
Innanzitutto mi scuso se la domanda non è inerente a WP.
Utilizzo:
<p style=”padding:2px 6px 4px 6px; color: #555555; background-color: #eeeeee; border: #dddddd 2px solid”>testo</p> per creare una formattazione tipo codice ma ogni volta mi viene creato un largo spazio sopra il codice
TITOLO
spazio
<codice>
Come posso azzerare questo spazio?
Ho provato a variare il padding ma lo spazio al di sopra resta il medesimo.
-
5 Dicembre 2017 alle 13:07 #122037TittiModeratore
A parte che quel padding (tra l’altro scritto male perché ridondante) non mi pare determinare lo spazio esterno ma quello interno (se, come mi par di capire, stai cercando di fare un box di testo nell’editor di WP, ma non lo dici), quindi è ovvio che non cambia nulla fuori, e a parte che lo spazio sarà quello normale del <p>, che significa paragrafo (ma anche questo va indovinato dato che non metti l’URL alla pagina), stai sbagliando a usare stile in linea.
Lo stile si fa con i CSS nel foglio stile del tema child, anche per non doverlo fare tutte le volte, e comunque quando lo chiamerai con <p> lo spazio sarà sempre quello, a meno che appunto da qualche parte non ci sia altro codice che lo determina, ma non vedendo la pagina chi può dirlo (non metterlo ora l’URL perché la tua domanda non c’entra con WP, e anche perché ho già risposto).
Oppure, se vuoi creare dei box di testo puoi usare il blockquote già presente nell’editor di WP, eventualmente da personalizzare sempre nel foglio stile.
Non è chiaro invece se ciò che vuoi è evidenziare del codice, direi di no, ma se cosଠfosse ci sono plugin apposta che lo fanno.
PS: a che serve scusarsi per una domanda off-topic e poi farla lo stesso.
-
24 Dicembre 2017 alle 18:37 #122047fabrixxPartecipante
Grazie e nonostante tutto Buone Feste
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.