Hacker News new | past | comments | ask | show | jobs | submit login

CSS does support flexible grids (with power equivalent to HTML tables), it is just that IE has not supported it until IE8, which means it hasn't been used widely.

I fint it strange that people keep blaming the shortcomings of IE6+7 on the CSS standard.




Reference? Are you referring to http://www.w3.org/TR/css3-grid/? Which is at the working draft status?


CSS2 (which has been a recommendation for a decade) supports display:table, which is equivalent to the layout model of HTML-tables: http://www.w3.org/TR/CSS21/tables.html#value-def-table

The working draft you refer to is a new model which is more powerful than either HTML tables or CSS2.


CSS emulation of tables doesn't meet the requirement though.

The question was whether CSS supports the primitives required to do grid layouts without coupling the CSS to HTML, effectively requiring the two of them to be treated as object code.

If you're going to require that the markup contain divs that are ordered and nested just so, so that they can be styled to layout like a table, then you might as well just use a table. Either way you are coupling presentation to semantics.


CSS is obviously always coupled to HTML in the sense that CSS applies styling and layout to elements in HTML. If you don't have an element to delimit the chunk of content you want to style, you cant do it with CSS. The point is just that the markup HTML should be independent of any particular presentation.

You don't have to use divs, you can use semantic elements (P, whatever) if that is appropriate for the content.

You definitely might not just as well use a table. The trouble with tables for layout is that they have the wrong semantics, which means they makes the page less accessible.


...which will be great in 2015 when enough browsers implement it to be useful. :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: