Philadelphia Standards Organization

Eric Meyer on the One True Layout

December 5th, 2005 by Martin Lambert

Eric is talking about the recently published One True Layout. We just spent quite a while on the first part - any-order columns. It basically involves floating your columns and using negative margins to lay them out in whichever order you want. See the article for details.

Where this technique gets really interesting is with columns whose widths are specified in different units - for example, one is 50%, another is 15em, and a third is 150px. Eric demonstrated how to handle this by scattering your units across a variety of CSS properties, including the element’s own margins, the margins of its neighbors, and the left property on relatively-positioned columns. He blogged about it as well. It won’t work if you’re juggling a dozen columns at once, maybe, but for most real applications it can be incredibly useful.

Leave a Comment

You must be logged in to post a comment.