Get a free trial // Grow your CSS skills // Land your dream job

Line-height not working inside span

  • # December 27, 2012 at 12:53 am



    PEKIN — China inaugura el, miércoles la línea de ferrocarril de alta velocidad…

    Line height doesn’t work… I even try doing line-height:8px for testing purposes but, noticed it doesn’t work inside that span block. I don’t know if it needs a p tag but, I don’t have control over that piece of code because is coming from a joomla extension.

    How can I fix the line height in this situation…
    Thanks in advanced for your time and help.

    # December 27, 2012 at 1:10 am

    Three options: 1) use a div instead of a span, 2) add “display: block” to force it to act like a block element, or 3) add “display: inline-block” to make it act like an block element while continuing to flow inline alongside its sibling text (assuming there is sibling text).

    # December 27, 2012 at 1:21 am

    I was able to edit the extension code and added a p tag between span… That worked.

    Thanks TreeRoot

    # December 27, 2012 at 1:53 am

    Use inline-block if you want it on the same line

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed