PDA

View Full Version : Resizing DIVs to max width


jitu78
10-05-2006, 01:13 PM
Hi All,

I want to create a flexible DIV based layout.

Here is design layout, globtier 1st template (http://www.globtier.com)

Layout should have horizontal scrolled on 800 resolutions.
And, It should not stretch after 1200 page width, that means pages should be stretch from 800 to 1200 px in width.

It should support at least IE/Firefox and Opera browser.

Can you help me to create this layout?


Thanks

felgall
10-05-2006, 09:16 PM
Here's the necessary CSS to do that for. Firefox, Opera, IE7, etc all understand min-width and max-width but IE6 doesn't so we use the second line which is an IE6 hack to get around that limitation.


<style>
body width:100%;min-width:800px;max-width:1200px;}
* html body{width: expression(document.body.clientWidth > 1200 ? "1200px" : (document.body.clientWidth < 801 ? "800px" : "100%"));}
}
</style>

jitu78
10-06-2006, 11:56 AM
Thanks Stephen

Your code works for my layout......:thumbsup: