Re: Block element width behavior

David Hyatt wrote to <> on 14 March 2003 in "Re:
Block element width behavior"
(<>) in reponse to a
question about setting 'width' to intrinsic width:

> Float the div.  <div style="float:left">...

That may work in current implementations, but there is nothing in the
specification to say that it should. I refer to CSS2:9.5, "Floats"

    A floated box must have an explicit width (assigned via
    the 'width' property, or its intrinsic width in the case of
    replaced elements).

The error recovery is not specified. When there is no explicit 'width'
setting, I suppose that using intrinsic width is acceptable. This does not
make intrinsic width the one correct approach.

Etan Wexler <>

Received on Saturday, 15 March 2003 20:07:42 UTC