Treehouse: Grow your CSS skills. Land your dream job.

Line height not working.

  • # January 11, 2011 at 1:16 am

    I am trying to add line-height to my blog post from firebug but the changes are not shown.

    Can anyone from the community try with their firebug that why line-height is not working for class ‘headlineleft’ i.e. the post title. The sample page is

    # January 11, 2011 at 1:27 am

    It’s picking up the line-height from #content. You’ll need to be a little more specific. You already have a #content h1 {}, if you add the line-height to that it will work.

    # January 11, 2011 at 1:48 am

    Aha, thanks Doc… it worked like a charm.

    I wish there was some kind of thanks button in vanilla forum so that i can show my gratitude.

    # April 14, 2012 at 9:21 pm

    Related: I have noticed a very annoying case in which the line-height doesn’t work no matter what. It probably has a reason, but instead of searching the “why” I found the “how” to make it work quickly.

    item {
    display: block;
    line-height: 1; }

    (The “1” can be whatever you want, of course)

    # April 14, 2012 at 10:58 pm

    Works here:

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

You must be logged in to reply to this topic.