W3C home > Mailing lists > Public > www-style@w3.org > November 2002

Re: Being clear about clear

From: John Lewis <lewi0371@mrs.umn.edu>
Date: Tue, 19 Nov 2002 23:25:14 -0600
Message-ID: <72590931224.20021119232514@cda.mrs.umn.edu>
To: www-style@w3.org

Hello Tom,
Tuesday, November 19, 2002, 4:55:11 PM, you wrote:

>  "This property indicates which sides of an element's box(es) may
>   not be adjacent to an earlier floating box."

> But then goes on to say for the "both" value:

>  "The generated box is moved below all floating boxes of earlier
>   elements in the source document."

> So which should it be? Just adjacent boxes or all previous floating
> boxes? From my tests, both IE6 and Gecko only clear adjacent boxes.
> Opera sometimes does and sometimes doesn't.

I agree the two sentences at first appear to contradict each other.
After reading them both and thinking about them a great deal, I don't
see a contradiction. In CSS 2.1, the definition of 'both' has been

 "The top margin of the generated box is increased enough that the top
  border edge is below the bottom outer edge of any right-floating and
  left-floating boxes that resulted from elements earlier in the
  source document."

In short, 'left' moves the generated box below left-floating boxes
(thus the adjacent side is left), 'right' moves the generated box
below right-floating boxes (thus the adjacent side is right), and
'both' moves the generated box below right- and left-floating boxes
(thus the adjacent sides are left and right, which can be described as
"both" or "all").

I think the last bit caused the confusion, because instead of saying
"left- and right-floating boxes," CSS2 says "all floating boxes." In
reality, there are only two types, right-floating and left-floating.

Received on Wednesday, 20 November 2002 00:25:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:17 GMT