Forum Moderators: open

Message Too Old, No Replies

How to Limit Page Width?

while keeping a fluid design

         

old_expat

3:59 am on Nov 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



New web site for myself ..

I'm using css and tables with a non-symmetrical 3 column approach .. no horizontal scrollbar for 800px screen res.

I can't figure out how to limit the width in case someone is using a high screen resolution (like 1600) .. which makes the site look *really* odd

For most of my sites I set a 740 px table and center it, which is a good compromise for 800 and 1024

On an 800 px screen the design looks a little crowded, but still okay.

If I use the 740 fixed width on this site, I probably should change to a 2 column layout.

Without using a fixed table width, is there any *realistic* way to set a "maximum" width for wide screen users?

How reliable are the screen sniffer scripts that show different pages for different screen resolutions.

I really don't want to do this, but I guess I could use (PHP) includes for the content.

Advice please!

rjohara

4:14 am on Nov 6, 2005 (gmt 0)

10+ Year Member



It depends on how universal your solution has to be. On all my pages I use:

body { max-width: 43em; }

Works perfectly under modern browsers; doesn't work under IE (but is just ignored: it doesn't break anything).

old_expat

5:32 am on Nov 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



With the majority of users (80%?) still using IE, the page need to work/look good for them.

By IE ignoring the BODY statement, I assume it fills the screen?

tedster

6:34 am on Nov 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use an IE expression in your CSS file to get IE to simluate max-width or min-width

[webmasterworld.com...]

old_expat

9:39 am on Nov 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks, Tedster .. I'll give it a try.