Forum Moderators: not2easy

Message Too Old, No Replies

CSS3: Template Layout Module

         

SuzyUK

7:11 pm on Jun 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As highlighted by a recent thread [webmasterworld.com], it appears it's definitely time that CSS finally took responsibility for Web Page Layout

the Tables v CSS debates appear to be past (at last;)) and it's agreed, I hope, that meantime we just have to use what works best for us, or our company's/boss's needs.

Now that semantics and accessibility needs across various platforms are coming to the fore, it's causing more frustration and adding to the myth that CSS doesn't work yet! It wasn't meant for this people.. well it was but not so very long ago people weren't interested enough to make it happen quicker, the kindly people who right the specs (note not standards, you can't standardise something until it's implemented and agreed on)

It's this "stuck in the middle" (yes, poppyrich it's a song [en.wikipedia.org] :)) that we CSS or HTML layout users alike are having to deal with, we either use tables and forgo some of the benefits of CSS Positioning, which doesn't work in table cells (simple really you can't relatively position (offset) a table cell as it's in a fixed grid already, and as tables are not really intended for layout either there shouldn't be a need to position elements inside them, tabular data is tabular data), or you use CSS Positioning, and/or (mostly) Floats and resort to little tricks (faux columns) to get the "full column stretch" look, and watch out for clearance rules while you're at it!

Floats nor Tables were designed for layout, and trying to use floats to mimic table layouts leads to frustration for many.. I mean it works and all, but unless you have a solid, well tested layout, it can require a bit of trickery at times, especially where floats/clears are also required in the content.

Anyway, to date there were 2 Modules proposed for CSS3 one the Advanced Layout Module and the other the Grid Positioning module,

Grid Positioning [w3.org] is Microsofts baby, and would likely suit those who come from a print publication/typography background, I like it's logic too.. though this one I think would appear the more complex, less intuitive of the two in the "barrier to entry" sense as it would require a very precise wireframe.

The Advanced Layout Module [w3.org], has recently been renamed The Template Layout Module [w3.org]

This one seems to be the one that might make it first, certainly there seem to be some recent activity to get it implemented, Bert Bos [w3.org] has give a couple of presentations about it lately:
8th May 2008 [2008.xtech.org]

The CSS Advanced Layout module that is currently under development in W3C grew out of a need to easily create "portal" pages in HTML with different layouts on screens of different sizes, in particular on mobile phones. But it can not only create grids for positioning text boxes and images, but also create very small grids, such as for placing the elements of a mathematical formula.

This one would appear to be the most flexible, or at least the more intuitive of the two, going by the specs anyway, and going by the W3C blog link above it appears they are going to go with as it is, despite the fact they haven't quite got it to deal with anything else except rectangles yet,

Bert reported that designers want non-rectangular regions, to put images in corners or in the center. However, auto-sizing non-rectangular slots (such as a C shape that has as much text above as below) is very difficult. In the interest of moving forward and getting implementations, fantasai suggested leaving the slots rectangular for this version.

Noted: To avoid overlapping constraints, width and height should not apply to slots, only to columns and rows respectively.

Sounds good to me, I'd rather get it going as there is obviously a need for a grid layout method and the CSS appears to be really straightforward too.. enought to get something going anyway, even swapping columns or elements is cinch, no need to worry about order the source code.

Anyway due to the recent activity it looks like it might be nearer than we think..

What do you think, could we use them both? any preferences? just want one NOW? write a better one?

[edited by: SuzyUK at 7:13 pm (utc) on June 6, 2008]

appi2

7:41 pm on Jun 6, 2008 (gmt 0)

10+ Year Member



I'll have Advanced Layout and Multicol [w3.org] chips and a side order of If lteIE7 Die.
Time to read :(

swa66

8:00 pm on Jun 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I kinda like the Template Layout Module, and if the very advanced things are indeed too hard to implement, well perhaps they could give us this and keep the next for the next upgrade.

I kinda like the step beyond printed layout and include the "Tabbed (stacked) displays", would make things a lot easier if this became supported compared to hiding, hovering, etc).

Adding on the non rectangular things would however make it lot more versatile than anything we have today.

Perhaps the grid positioning module would make more sense for printed media (types).