Re: Floating objects

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 UTC