Jump to content


Photo

min-width in IE


  • Please log in to reply
1 reply to this topic

#1 jmag

jmag
  • Members
  • PipPip
  • Member
  • 22 posts
  • LocationSweden

Posted 31 March 2006 - 06:26 PM

Hello,

I've got this wrapper-div I want to be atleast 950px. So I used the min-width, knowing it-don't work in IE, so I came here to find the fix for it. All good until I make the IE window less than 950px.

I took a look at the link which is in AndyB's post further down where the fix seems to originate from, and even copied the code from that page and just changing the values to my specs. Even still it crashes IE. But the links page where I copied it from works perfectly.

does anyone see anything wrong with this bit? Here are all the divs in my css.

#wrapper {
    min-width: 950px;
    width: expression(document.body.clientWidth < 950 ? "950px": "auto" );
}

#logoholder {
    background-image: url(../img/logo2.gif);
    background-repeat: no-repeat;
    height: 115px;
    width: 100%;
    float: left;
}

#mainrow {
    background-color: #ffffff;
    width: 100%;
    height: 385px;
    float: left;
}

#maincontainer {
    height: 385px;
    width: 500px;
    padding: 5px 140px 5px 10px;
    vertical-align: top;
    float: left;
}

#rightcontainer {
    float: right;
    height: 385px;
    width: auto;
    text-align: right;
    background-color: #ffffff;
    vertical-align: top;
}

#menu {
    padding-top: 6px;
    padding-left: 3px;
    float: left;
}


#2 jmag

jmag
  • Members
  • PipPip
  • Member
  • 22 posts
  • LocationSweden

Posted 31 March 2006 - 07:31 PM

It appears that the element size can't be equal to the window size, it has to be less. It makes atleast my IE crash for some reason.

this works:
width: expression(document.body.clientWidth < 950? "920px": "auto" );

while this doesn't:
width: expression(document.body.clientWidth < 950? "950px": "auto" );





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users