min-height current wisdom
I need to set a minimum height for a div, yet have it expand with the
contents.
I have this from 2005:
<style type="text/css">
div{
height: 12px;
background-color: red;
1px solid black;min-height:12px
}
html>body div{
height: auto; /* for not-IE */
}
</style>
<div>one<br>two</div>
<br>
<div></div>
That works in my Firefox 2.0, Opera 9 and IE6 win XP.
Is that still the current best wisdom on this task? This still works
in IE7?
Jeff
|