Log in

View Full Version : fixed width + fluid width (IE hack anyone?)



traq
02-25-2009, 04:12 PM
I'm using DD's left frame layout (http://www.dynamicdrive.com/style/layouts/item/css-left-frame-layout/) and I've got the right (content) column set at 800px. With the left (static) column, this makes the site 950px wide. In order to prevent horizontal scrollbars on smaller screen/window sizes, I added a "max-width: 95%" in the inner padding div, like so:


#main{
width: 800px;
[...]
}
[...]
.inwrap{
max-width: 95%;
[...]
}
this keeps everything within the screen width in FF, but IE just ignores it.

the site is here (http://seascouts.arrowheadsps.org/newindex.html)
the css is here (http://seascouts.arrowheadsps.org/library/site.css)

Does anyone have a suggestion? thanks!

bluewalrus
02-26-2009, 04:02 AM
Give these a try maybe.
http://archivist.incutio.com/viewlist/css-discuss/49128
http://www.svendtofte.com/code/max_width_in_ie/

traq
02-26-2009, 04:33 AM
well, good information, the second one especially. so far I'm not getting it to work in percents. I can at least get it to resize to 800px width if it's smaller than 950, which is my main goal anyway.

But if anyone has anything else, I'd be happy to hear it!

traq
02-27-2009, 02:25 AM
actually... this isn't working out too well. It does what I want it to do for IE, when the browser window is too small, but completely messes up the layout otherwise, and in other browsers. It's also interfering with my glossymenu css, for some reason.

this is what I've got:

#main .inwrap{
width: expression(document.body.clientwidth < 950px? "800px": "auto";
}
any suggestions?