> I soon have too make a start on a new site for a client and they want > to use max-width to limit the expansion of the site. Just wondering > if there is a definitive or good example anywhere of implementing > this correctly for IE etc?
Hello Steve, Dean Edwards' IE7 supports this, but I found it to be too bloated just to get a max-width, and also might add support for other things you didn't want supported in your layout. There was also a solution by Andrew Clover which worked but I can't remember why I didn't use it. So I've been using Svend Tofte's http://www.svendtofte.com/code/max_width_in_ie/ and it's worked great so far (irwf.org.ar has been working for years, and next week will be online gsystems.com which also uses it) My *personal choice* is to use a liquid #container, and make sure the whole layout works well with, say, #container { width: 90%; }, so you're covered if the UA doesn't support max-width at all. Then I have an IE 5 - 6 only stylesheet (since IE7 support max-width): <!--[if lt IE 7]> <style type="text/css" media="screen"> @import url( css/screen_ie5-6.css ); </style> <![endif]--> And it that stylesheet I use this to get max-width/min-width: #container { width: expression( (document.body.clientWidth > 986)?"985": (document.body.clientWidth < 765)?"760":"auto"); } Tip #1: Note that *the widths don't match*, that is, if the canvas is larger than 986px, I set the container to 985px. This avoids random crashes and layout jumpin'. Tip #2: Also, you might need to add position:relative; or the holly hack if you get dissapearing elements when resizing the browser. Tip #3: In IE 5.0, if you see it has problems inheriting the width from the container or you have positioned elements anchored at the wrong place, you can try adding some extra div inside your container, just with position:relative or width:100%; ... That's IE, then you just use max/min-width in your main screen CSS for modern browsers :p. HTH, -- Manuel Razzari YO -> http://ultimorender.com.ar/funkascript CVAM -> http://conVistaAlMar.com.ar ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/