By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,652 Members | 1,842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,652 IT Pros & Developers. It's quick & easy.

Resizing DIVs to max width

P: 30
Hi All,

I want to create a flexible DIV based layout.

Here is design layout, globtier 1st template

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
Oct 5 '06 #1
Share this Question
Share on Google+
2 Replies


100+
P: 143
Not possible with IE.

There's a CSS property for max-width and min-width, along with height too... but IE doesn't recognise these properties unfortunately.

You can cheat a little, make it dynamic for one browser and not for another, using the underscore "hack".

[code]
div#content {
min-width: 800px;
max-width: 1200px;
_width: 1200px; /* for InternetExploder */
}

The underscore hack basically works because IE doesn't recognise properties or names that begin with an underscore. Essentially, it ignores the existance of the beginning underscore, so whilst other browsers see _width and understand that there's no such property called _width, IE only sees 'width'.

Also, are you really working on this site? Because firstly, that doesn't look like a template that's just been designed and you're not sure whether to use it. That's a complete website, which apparently is finished and has complete content (and furthermore is currenty already live).
Oct 5 '06 #2

P: 30
Not possible with IE.

There's a CSS property for max-width and min-width, along with height too... but IE doesn't recognise these properties unfortunately.

You can cheat a little, make it dynamic for one browser and not for another, using the underscore "hack".

[code]
div#content {
min-width: 800px;
max-width: 1200px;
_width: 1200px; /* for InternetExploder */
}

The underscore hack basically works because IE doesn't recognise properties or names that begin with an underscore. Essentially, it ignores the existance of the beginning underscore, so whilst other browsers see _width and understand that there's no such property called _width, IE only sees 'width'.

Also, are you really working on this site? Because firstly, that doesn't look like a template that's just been designed and you're not sure whether to use it. That's a complete website, which apparently is finished and has complete content (and furthermore is currenty already live).

Thanks Steven

Your code really fantastic...:)

My Problem has been solved.
Oct 6 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.