View Single Post
  #5 (permalink)  
Old April 7th, 2005, 05:04 PM
sonofsanta sonofsanta is offline
Registered User
 
Join Date: Apr 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That solution's pretty messy, and requires extra mark-up. The easiest way to deal with this is to realise that IE, in all it's glory, treats
Code:
height
as
Code:
min-height
Who knows why. The only problem is getting it to IE alone, but that's pretty easy due to IE's * selector.

If this is your HTML then:
Code:
    <div class="content">
        Content here.
    </div>

...your CSS would be:
Code:
div.content {
    min-height: 500px;}    /* for compliant browsers */
* html div.content {
    height: 500px;}     /* for IE only. * html is only recognised by IE */

You can use any height, obviously, 500px is just an example. I'm not definite on the backwards compatibility for versions of IE, as far as the * selector goes - but older versions often have their own hacks anyway to target them specifically. This is a lot neater and entirely compliant though, and is really only 2 more lines of basic CSS. Score :)

Reply With Quote