W3C home > Mailing lists > Public > www-style@w3.org > December 1998

Vertical Alignment of Floats, again

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Thu, 24 Dec 1998 12:42:57 -0500 (EST)
Message-Id: <199812241742.MAA23535@login2.fas.harvard.edu>
To: www-style@w3.org
One thing that I forgot to mention in my previous post on floating
elements [1] was that I also think rule six in section 9.5.1 [2] should
be changed.  It currently says:

"The outer top of an element's floating box may not be higher than the
top of any line-box containing a box generated by an element earlier in
the source document."

I don't know of a browser that does this correctly.  This is tested in
the first test of section 4.1.4 of the CSS Test Suite. [3]  MSIE 5 beta
2 is the closest, since it does this correctly (although it may not
account for line-height -- I haven't checked) for right-floating
elements.  I have never seen it done correctly for left-floating
elements.  This is because it is quite difficult to do, because it
requires moving text that has already been laid out.  It is much easier
to have a layout algorithm that can be done in one pass.

Thus I think the above rule should be changed from "higher than the
top" to "higher than the bottom."

David Baron

[1] http://lists.w3.org/Archives/Public/www-style/1998Dec/0065.html
[2] http://www.w3.org/TR/REC-CSS2/visuren.html#float-position
[3] http://www.w3.org/Style/CSS/Test/current/sec414.htm

L. David Baron         | Freshman, Harvard
dbaron@fas.harvard.edu | < http://www.fas.harvard.edu/~dbaron/ >
Received on Thursday, 24 December 1998 12:42:59 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:49 UTC