Re: Block element width behavior

David Hyatt wrote to <mailto:www-style@w3.org> on 14 March 2003 in "Re:
Block element width behavior"
(<mid:1832B78E-5672-11D7-AB0B-00039382AC6C@apple.com>) 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"
(<http://www.w3.org/TR/REC-CSS2/visuren.html#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 <mailto:ewexler@stickdog.com>

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