Jump to content

Archived

This topic is now archived and is closed to further replies.

jmag

min-width in IE

Recommended Posts

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.

[code]#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;
}[/code]

Share this post


Link to post
Share on other sites
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:
[code]width: expression(document.body.clientWidth < 950? "920px": "auto" );[/code]

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

Share this post


Link to post
Share on other sites

×

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.