Jump to content

saila.com

Online media matters

How can I have a liquid layout, with a maximum width?

The easiest thing to do is use the property max-width. Unfortunately, that’s not supported by most versions of Internet Explorer.

A workaround is to use that property alongside some JavaScript to detect and set the width of the item. For example, if the browser is wider than 800 pixels, the JavaScript can lock the item at width: 800px, otherwise it is set at width: 100%.

See a working demonstration.