Jump to content

"min-height" not work in IE6? Is there a workaround?


ShootingBlanks

Recommended Posts

I made the background (body) of a page black.  Then I have a div that's 500px wide with a white background and a margin of "auto" and a padding of "0".  I want it to appear that there's "black bars" on either side of the page, but sometimes there's not a lot of content in that white div, so it doesn't stretch at least to the bottom of the page...

 

...To compensate, I added a "min-height" of 600px to the white div.  This worked fine in FireFox and IE7, but in IE6, it still doesn't work.  The "black bars" (or, the page's background) only goes down as far as the white div spans (which in some cases is only halfway down the page).  Is there a workaround for this?  Why doesn't "min-height" work in IE6?  Thanks!

Link to comment
Share on other sites

IE doesn't recognize any of the min-* or max-* CSS attributes. In order to get a min-height working, try something like this:

 

HTML code:

<div id="wrapper-div">
  <div class="spacer-div"></div>
  <div class="spacer-clear"></div>
</div>

 

CSS:

#wrapper-div {
  border: 1px solid #000000;
  background-color: #f4f4f4;
}

.spacer-div {
  float: right;
  height: 400px;
  width: 1px;
}

.spacer-clear {
  clear: right;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.