CSS Positioning: Three Specs Better than One?

Share this article

One of the areas in which CSS 3 will introduce a lot of new features is page layout. This is widely considered to be a good thing. But with the W3C having just announced that there will be two separate modules for page layout in CSS 3, the standards may be asking too much of browser developers.

Rewarding as it may be to bend CSS’s positioning features to your will, I think we can all agree that CSS 2 was not designed with three-column layouts in mind. Floats and negative margins can get the job done, but they certainly put up a fight.

Introduced by the W3C as a working draft in December 2005, there’s no denying the CSS Advanced Layout module is way better than what we have now, but the apparent lack of interest from browser vendors in implementing this module suggests it might be on the wrong track. Following the release of the latest working draft in August, SitePen’s Alex Russell had some harsh criticism:

I’m not even sure if the “Advanced” Layouts [module] should be mentioned for the fear that more people might actually look at it. You’d expect an “advanced layouts” module to give us hbox and vbox behaviors or a grid layout model or stretching … but no, the “answer” apparently is ascii art.

It seems at least some members of the W3C CSS Working Group agree. Last month, the group released the first public working draft of another CSS 3 module for layout: CSS Grid Positioning.

This new layout module builds on the existing Multi-column Layout module for text columns, which saw its latest working draft in June, and which is now partially supported by Firefox 2 and Safari 3. Grid Positioning enables you to align elements to an ‘implicit grid’ defined by a multi-column element. Alternatively, you can define an ‘explicit grid’ and then align elements to that. This works by introducing a new CSS length measurement: the grid unit (e.g. 1.5gr).

The interaction between the Advanced Layout module and the Grid Positioning module remains to be specified, but it’s expected that an element that defines a positioning grid using the Advanced Layout module will also define an implicit grid for aligning elements with the features of Grid Positioning.

All this sounds great, but will we ever be able to use any of it? Even relatively adventurous browsers like Opera and Safari have steered clear of the Advanced Layout module so far, and while Grid Positioning does build on features that are getting browser support, this new layout module looks no easier to implement.

At a time when the biggest challenge for CSS is getting browser makers to invest in new features, should the W3C be watering down its ‘sales pitch’ with multiple CSS modules for doing the same thing? Or is it a good thing for the W3C to keep proposing new CSS layout standards until the browsers take an interest in one of them?

Kevin YankKevin Yank
View Author

Kevin Yank is an accomplished web developer, speaker, trainer and author of Build Your Own Database Driven Website Using PHP & MySQL and Co-Author of Simply JavaScript and Everything You Know About CSS is Wrong! Kevin loves to share his wealth of knowledge and it didn't stop at books, he's also the course instructor to 3 online courses in web development. Currently Kevin is the Director of Front End Engineering at Culture Amp.

Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week