Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Line heights

Discussion in 'Font Forum:' started by Silver Firefly, Jul 10, 2009.

  1. Silver Firefly

    Silver Firefly Senior Member

    Hi folks!

    I'm just wondering when the browser calculates the line height from a CSS stylesheet, where does it calculate from? Like where is the starting point?

    I'll demonstrate what I mean:

    If you look at "Weblog" for example, you'll see that the "g" has a tail. I think that the line height is divided pretty much in two. So if I were to have "Weblog" sized at 16px, and the base line height is set at 24px (16*1.5), then there should be 12px of space above and below the word "Weblog," right? But my problem is, does the browser add that 12px of space below "Weblog" where the tail of the "g" ends, or does it start at the baseline (where the red zone starts)?

    [​IMG]

    This typography stuff is confusing to say the least... :confused:
     
  2. Xenonsoft

    Xenonsoft Active Member

    I don't actually know the answer, but I assume if you had text size 16px, line height 24px that it would display the text and center it vertically within the 24px (basically having 4px above and below, in most cases).
     
  3. Harry

    Harry Senior Member

  4. Silver Firefly

    Silver Firefly Senior Member

    Thanks for the replies.

    I've been testing what Fred says and it looks like it's correct, at least in Photoshop. Hopefully it's the same in browsers.
     
  5. Well you'll have some hell with IE and any kind of line heights and <br>'s etc but the other browsers should respond properly :)
     
  6. Harry

    Harry Senior Member

    IE handles line heights fine (well the only trouble I've ever had is in IE8)
     
  7. Silver Firefly

    Silver Firefly Senior Member

    I thought IE8 was supposed to be standards compliant?
     
  8. Harry

    Harry Senior Member

    Its handling of line-heights isn't to do with standards compliancy, it's more to do with the fact it's a heap of s*it.
     
  9. Silver Firefly

    Silver Firefly Senior Member

    I won't argue with that!
     
  10. blueocto

    blueocto Senior Member

    I literally LOL'd when I read that.
    Considering I've just spent a few hours this morning, trying to get IE7/IE8 to view a flash file - to no avail!
    IE is gay. End of lol
     
  11. Sunburn

    Sunburn Active Member

  12. Silver Firefly

    Silver Firefly Senior Member

  13. andyshaw

    andyshaw Member

    The leading is set from the baseline, the descender doesn't affect this.
     
  14. Silver Firefly

    Silver Firefly Senior Member

    Okay got it. Thanks.
     

Share This Page