[thelist] min-height on td tags
Ken Snyder
ksnyder at coremr.com
Fri Apr 27 10:49:55 CDT 2007
Ben Glassman wrote:
> I have been working on a 30-boxes style calendar and was trying to use the
> css property min-height to set a minimum height on the TDs so that they
> would be square unless the had content in them that pushed them open wider.
> For some reason the min-height property with a px value does not seem to be
> working when applied to TD tags but it does work on paragraph tags and the
> like. Anyone have any insight into this? Am I just misunderstanding
> something?
>
> Thanks,
>
> Ben
>
IE6 does not support min-height in any context except <td> tags in
tables with "table-layout:fixed"; Other browsers support min-height but
do not support "table-layout:fixed". With TDs you'll want to just use
height; it will have the desired effect across most/all browsers.
On tags other than <td> You can emulate min-height by using conditional
style sheets (there are several other hacks as well):
<*style* type="text/css">
.mycontainer {
* min-height*: 500px;
}
</*style*>
<!--[if IE lte 6]>
<*style* type="text/css">
.mycontainer {
height: 500px;
overflow: visible;
}
</*style*>
<![endif]-->
Also see
http://developer.apple.com/internet/webcontent/bestwebdev.html
http://www.dynamicsitesolutions.com/css/min-height-for-msie/
http://www.elated.com/articles/internet-explorer-conditional-comments/
-- Ken Snyder
More information about the thelist
mailing list