Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I get really annoyed by the recurring CSS vs. tables debates, because they seem to be so dogmatic and often based on misunderstandings of CSS.

CSS was initially designed to support every kind of typography or layout which was achievable using presentational HTML. It was rightly recognized that if some effects (no matter how ill-advised) were only possible using presentational markup, people would not migrate to CSS. This is the reason properties like "blink" were included in CSS.

Regarding table-like layouts, the corresponding CSS property is called "display:table", and was included in the CSS 2.0 standard 10 years ago.

IE however did not and does still not support "display:table". Therefore there is no direct CSS alternative to table-layouts which works cross-browser.

A table-like layout can still with some effort be emulated by pushing other CSS features like floats to the limits. But this is actually misusing these CSS construct for a purpose they were never intended for, which makes it generally convoluted and inflexible compared to "just using tables".

But it is important to realize that the problems with the CSS approach is not that CSS is badly designed - or requires a fundamentally different mindset - but simply that the implementation in IE is incomplete.

One should also realize that tables are superior only in some specific circumstances (as described in the article). Generally CSS is better and easier to use for layout, even considering the omissions in IE.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: