sam foster wrote:
> This is so simple I must be missing something. But I have this div,
> that I want to give a minimum height of 1px. It may or may not get
> any content in it, and I want it to collapse up if its empty. IE 6
> doesnt of course support min-height, so for now I'm using height:
> 1px. But even this simple case fails:
> http://www.sam-i-am.com/work/sandbox/css/iestubbornbox.html
IE doesn't understand that the div is empty, so it adds line-height.
Add a comment inside it, and IE will come to its senses...
----------------------------------------------------
This red div below should be 1px / 100%
<div id="stubbornbox" style=""><!-- --></div>
----------------------------------------------------
...and such a comment won't disturb even if you add some real content
later - and you can take the comment out then.
---
Note that Holly's 'overflow: hidden' actually works as 'max-height' -
preventing the div from ever growing taller than 1px no matter how much
content you put into it. So, that solution won't work well in a real page.
regards
Georg
--
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/