Quick CSS help.

Associate
Joined
28 Sep 2004
Posts
1,798
Location
Deepest Cornwall
Is there anything wrong with:

Code:
#container
{
min-width: 1000px;
max-width: 80%;
margin: auto;
}

Just wondering as I'm using a hosting service for a WoW guild website (one of those WYSIWYG editor jobbies), the customisation is pretty good overall but the width is bugging me. There is a box where you can input your desired width, although there is also a custom CSS box aswell. Now I want a minimum of 1000px but i dont want it fixed to that, I'd like it to scale up with resolution also. I think the preset width and the CSS are conflicting but I wanted to check if it was my CSS to blame first!
 
A min width of 1000px is kind of silly. 1024x768 is the most common resolution and 1024-30=994. 30px being the width of scrollbars.

As for the CSS, there is nothing wrong with that, although I wouldn't set auto width all around, you only want it on the sides, so margin: 0 auto;
 
min and max properties don't work at all well in IE - in fact I'm pretty sure that won't work in <IE8. Here's a site with a workaround.

TBH though, I'd design your site for a specific width (less than 1000px) and stick to that. Using min/max is a recipe for a lot of headaches.
 
Last edited:
Back
Top Bottom