It looks like what you want is a layout that changes when the browser is resized, but only to the maximum width.
If this is the case, you can do it in CSS or in JavaScript.
Imagine your content is in an element of type:
<div class="container"> -content here- </div>
My preferred option would be to use CSS as follows:
.container{ max-width: 1200px; width: 100%; }
If you need to support IE6 (which does not support maximum width), you can try using an expression in IE6 CSS:
.container{ width:expression(document.body.clientWidth > 1200 ? "1200px" : "100%" ); }
If you want to use JavaScript: you can simply resize your elements in a window resize event:
$(window).bind('resize', function() {
You can start this logic first with
$(window).trigger('resize');
stucampbell
source share