W3C home > Mailing lists > Public > www-style@w3.org > January 2000

Re: Floating objects

From: Bert Bos <Bert.Bos@sophia.inria.fr>
Date: Tue, 11 Jan 2000 13:04:07 +0100 (MET)
To: Allan Odgaard <Duff@DIKU.DK>
Cc: www-style@w3.org
Message-ID: <14459.6189.428351.318187@www43.inria.fr>
Allan Odgaard writes:
> Hi there, I'm writing a CSS2 capable browser and have a question.

That's good news. What are your plans for that browser?

> 
> The standard says that floating boxes are "outside the flow", does this mean
> that if I have a box which floats to the left and a following (block level)
> box which is taller, then the text in the following box should no longer be
> indented, when the y position of the generated linebox is below the floating
> object?

Correct.

> 
> I.e. this code:
> 
> <Div Style="float: left; width: 100px">Little box floating.</Div>
> <Div>A lot of text in the following box...</Div>
> 
> Should be rendered as:
> 
> Little box | A lot of
> floating   | text in
> -----------+ the
> following box...

Yes.

> 
> Rather than:
> 
> Little box | A lot of
> floating   | text in
> -----------+ the
>              following
>              box...
> 
> Further more, if the following box is given a border, should it then be
> rendered over the floating box? I.e. to surround all of the text shown in the
> first example.

Yes, the border should surround all of the text in the first diagram,
but the bordeer should not be over the float.

There are some ambiguities with respect to exactly what is "on top"
(see an earlier thread in this list[1]), but in principle the float
should be drawn in front of the DIV's border.

(Although in your example, since the float is small and the text is
long, there would be no overlap:

    ######################
    #+-----------+ A lot #
    #|Little box | of    #
    #|floating   | text  #
    #+-----------+ in    #
    #the following       #
    # box...             #
    ######################

)

[1] http://lists.w3.org/Archives/Public/www-style/1999Sep/0063.html


Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Tuesday, 11 January 2000 07:04:17 GMT

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