Hi, I use % for the width of my website so it looks good in all screen sizes. I want to know if there's a way to stop it from getting smaller ones it reaches 800px because that's the smallest screen size used. Thanks in advance
I think only certain browsers suport min-width, so an idea might be to put a div inside the main content part of the site, that is 1px X 800px wide, this way the main container will not get smaller than that div... If you need more help, PM me some more details and im sure i can be of some help
Wow that's awesome thank you so much, the min-width works in FF IE 7-8 (I don't know about 6) and Opera! again thank you for your help
min-width works in all browsers except lte IE6. Two general solutions (although the one given by happyharry is clever, but instead of making some useless div for that purpose, try giving this width to something that already exists): IE expressions in the CSS example: #container { min-width: 780px; } * html #container { width: 780px; width: expression((document.body.clientWidth>1400) ? "1350px" : ((document.body.clientWidth>800) ? "auto" : "780px")); } Code (markup): I'm still learning javascript, which is what this basically is, and so haven't yet figured out how to do the expression without mentioning a max-width. The width statement before the JS is the default if the browser can't understand the script (no js parser or JS disabled or whatever). Second drawback is, when validating the CSS, jigsaw barfs-- you need to comment it out before sending to the validator. Because it's hidden behind the * html hack, no other browsers see it. Second technique: requires no scripting at all, but like harry's requires an additional HTML element. Paul O'brien made it, so I'll just link to his page:http://www.pmob.co.uk/temp/min-width-ie.htm Both of these examples are only better than harry's in that they allow (and are made for) a max-width. Simply making someone in your page 800px wide or whatever may be the simpler method-- again, though, just try to find someone who can the do job instead of adding non-semantic elements.
Still, I overthink things and prolly wouldn't have just realised that if someone on the page is 800ox wide, the page couldn't shrink beyond that-- your solution was actually more elegant, harry : )