When working with CSS/HTML, I noticed that using a simple text within a div without any margin or padding, and specifying a font-size of 36px with a line-height also set to 36px doesn't fit perfectly - there is always some spacing at the top of the line. By reducing the line-height by 20% (to around 29.8), I was able to achieve the desired effect.
I'm curious as to why this happens. Is there something related to browsers that I might be overlooking? I initially thought that setting the line-height equal to the font-size would eliminate any extra spacing around a line.
Update: It turns out that the spacing issue I am experiencing is known as "half-leading". Despite setting the line-height to match the font-size, browsers still calculate half leading which results in some additional spacing.
Update 2: I came across information in the CSS specification detailing line-height: http://www.w3.org/TR/CSS2/visudet.html#line-height. However, I'm still puzzled about how to prevent the inclusion of ascender/descender spacing altogether.