Often you’ll need to trigger hasLayout in WinIE 6 and earlier, and a common trick is to use height=”1px” to trigger hasLayout because WinIE won’t honor the height anyway. The problem with this technique, however, is that IE6 won’t allow you to select the text in a div with a height of 1px, unless it’s in a table. One solution would be to use position=”relative” to trigger hasLayout, and for the most part it work, but in certain cases WinIE 5.5 won’t honor margins and padding on a parent div. So the final solution is to use position=”relative” and height=”1px” but restrict the height declaration to WinIE 5.5 because it doesn’t have the text select problem.
#main
{
position: relative;
\height: 1px;
he\ight: auto;
}