¿Agregar un relleno uniforme alrededor de cada línea de un encabezado?
Frecuentes
Visto 134 veces
1
i'm making a new site where the headings have backgrounds around them and a little padding.
This is a responsive site, so in some states the headings will break into multiple lines, resulting in them losing the padding to the right on the first line, and to the left on the second line. I am using display:inline since the padding needs to be adjusted around each line.
Is there any way to keep the padding when breaking lines?
Ejemplo: http://jsfiddle.net/gmW5X/
The padding is missing after la introducción de y antes al ...
This does not need to scale down to old ie since the problem only appears at the mobile css targeted to primarely iphone. However, i'd very much like not to alter too much html :/
2 Respuestas
0
I don't see another solution but wrap each word in span... http://jsfiddle.net/gmW5X/4
Respondido 28 ago 12, 10:08
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas html css padding or haz tu propia pregunta.
problem is i dont know where line-break will occur since it breaks on different places depending on the device :/ - jonas
yeah if i add a separate tag inside the headings i need to know beforehand where the line breaks will be? Also, they will come from a cms :/ - jonas