W3C home > Mailing lists > Public > www-html@w3.org > December 1999

RE: [www-html] <none>

From: Chris Wilson <cwilso@MICROSOFT.com>
Date: Wed, 29 Dec 1999 17:41:06 -0800
Message-ID: <C35556591D34D111BB5600805F1961B91D5CDCEE@RED-MSG-47>
To: "'Kirk Ruff'" <marvel@datacruz.com>, www-html@w3.org
>    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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:52 UTC