News for hackers. Stuff that matters.
Re:Ask HN: CSS vs table based layouts by jsdalton on Friday January 23, 2009 @04:48PM (#447163)
I used to design using tables, then I learned how to do it in CSS and now I use CSS exclusively. There are only a few instances when I don't, namely:

* When I want vertical centering and the column height is not fixed.

* When I want the width of a column to expand to the width of its widest element, but no further.

* If I wanted a background color to run the full length of a column, not just where the content was. (Actually there are CSS hacks for this, but I don't love them. I myself never use this design pattern any more, so it doesn't matter.)

In other words, you can still deploy tables non semantically to address certain, specific challenges that are not easy in just CSS, while still predominantly using CSS for layout and tables for data.

There are no comments on this comment yet.