On Oct 12, 2009, at 5:12 PM, Alan Gresley wrote:

> <http://css-class.com/test/bugs/ie/8/first-letter.htm>
>
> Firefox does follow the specs since the first-letter is floated,  
> thus is
> it display;block. In IE8 though it showing as display:inline. The
> first-letter overlaps the following block by the same amount of space
> that is above and below the first-letter.

That is not true. The first-letter _is_ floated in IE in the second  
block (it pushes the inline content in the lime-green block aside).  
Check what WebKit or Opera does.

The difference you see with Gecko (but not with e.g. WebKit) is caused  
by the line-height. In the case of a floated :first-letter, Gecko  
follows this part of the spec [1]:

> To allow UAs to render a typographically correct drop cap or initial  
> cap, the UA may choose a line-height, width and height based on the  
> shape of the letter, unlike for normal elements.

WebKit, Trident and Presto generate a line-box based on the computed  
line-height, whereas Gecko completely ignores any line-height (that is  
one of the reasons why my test case specifies a very narrow line- 
height - the whole code is carefully calibrated for x-browser compat).  
A little mouse told me that Presto (Opera) is working on implementing  
what Gecko does…
That is also why the selection box in your screenshot from my test  
case is much taller in IE than it is in Gecko.

[1] http://www.w3.org/TR/CSS21/selector.html#first-letter

Philippe
---
Philippe Wittenbergh
http://l-c-n.com/





______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to