Digital Web Magazine

The web professional's online magazine of choice.

The right size for any resolution

Nick Finck

September 20, 2004 at 8:03 PM

Cameron Adams is a brilliant man. Why do I say this? Because Cameron is working on a concept that will put the ugly liquid vs. fixed debate to death for good. In his post Resolution dependent layout he describes a technique that doesn't stay fixed but also doesn't flex... it adjusts and remaps the layout based on what resolution you are at. Still confused? No worries, check out his example layout. Resizing the browser shows it all in action.


Luke Shingles

September 22, 2004 at 2:45 AM

Cameron's example uses JavaScript to change stylesheets. When CSS3 is well supported you'll be able to do the same thing very easily using media queries. Opera is currently the only browser to support it. <link rel="stylesheet" type="text/css" href="narrow.css" media="screen and (max-width: 599px)" /> <link rel="stylesheet" type="text/css" href="wide.css" media="screen and (min-width: 600px)" />

Nick Finck

September 22, 2004 at 10:33 AM

CSS3 support is years away. Heck, full CSS2 support is still a leap for some browsers. I don't see any problem with using JavaScript to switch stylesheets. That's what JavaScript is intended to do... control the behavior of the page.

Media Temple

via Ad Packs