RE: [www-html] <none>

>    I have noticed that a <div style="....."></div> cannot have a height
>less than 15 pixels in IE5. Consider the following:
>
><div style="position: absolute; top: 398; left: 20; width: 5; height: 5;
>background: red; z-index: -1"></div>

The height you're seeing is due to the default text size.  I don't know
exactly why it's applying in this particular DIV, since you don't have even
any whitespace, but it's causing the DIV to overflow and grow bigger.

To work around this, either set 'overflow' to 'hidden', or set a very small
(e.g. 1px) 'font-size'.

>Is this behavior correct?

Not specifically.  Section 10.5 of the CSS2 specification does say
"[Elements] that require more than [the specified 'height' value] will
overflow according to the 'overflow' property."  It depends, I suppose, on
your interpretation of a couple of things - like whether the font-size
requiring more height should cause overflow when there's no text, and
whether the background should be painted in the overflow area.  This case in
particular I think is broken.

-Chris Wilson

Received on Wednesday, 29 December 1999 20:43:51 UTC