|
Posted by Ben C on 12/31/07 22:26
On 2007-12-31, Bazley <jmp6789@hotmail.com> wrote:
> But why do the 100% bits not work? I would have thought that a floated
> element must know how large its container is.
Why? It knows how wide it is, not how high.
The container's height depends on the float, not directly (unless you've
got clearing etc.), but it affects how the text wraps, and that affects
the height. So to allow a float to be a percentage height of an auto
height container creates a circularity, and CSS 2.1 explicitly says that
in that situation the percentage height is treated as auto.
Navigation:
[Reply to this message]
|