Liquid design to a max!

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
sweahe
Forum Commoner
Posts: 52
Joined: Sat May 04, 2002 4:07 am
Location: Växjö, Sweden

Liquid design to a max!

Post by sweahe »

Hi!

I'm developing a site where I want the widths to stretch and adapt to different screen and windowsizes.... but I would like it to stretch up to a max width. Even if the screenresolution is much higher the width of my 'white paper' should stop stretching with this max set width of my choice. The reason I want this is because the page doesn't look as nice in higher resolutions, too much white in between.

Is there a way to do this? I'm using XHTML and CSS, no tables at all.
You can see it here... http://www.lonesomepine.se

Thanks!
Andreas
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

unfortunately there isn't. this is because XHTML and CSS and not "programming languages" and there for cannot be set with conditions like an if statement.

btw, i like the set up of your XHTML and CSS, very clean, very nice :)
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You may be able to do this in CSS, the max-width property can set an upper bound on the width of an element. It's a CSS2 property which means that it probably won't work on a lot of browsers unfortunately.

Mac
sweahe
Forum Commoner
Posts: 52
Joined: Sat May 04, 2002 4:07 am
Location: Växjö, Sweden

Post by sweahe »

Worked great!! ..at least in Mozilla 1.1, not IE 6, but I guess it will eventually. =) Just one thing, when it hit the max, the page wasn't centered any more, is it just a bug or?

Thanks!
Andreas
Post Reply