• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Line heights


#1
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)?



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

Xenonsoft

Active Member
#2
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).
 
C

chrismitchell

Guest
#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 :)
 

Harry

Senior Member
#8
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.
 

blueocto

Senior Member
#10
Harry said:
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.
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