danny_t — 2011-03-15T18:03:53-04:00 — #1
While I'm asking question, I have another.
I realize I'm in the middle of css guru's who probably hate tables done in html, but why shouldn't you use tables if they work fine?
I am definately not a guru of anything by any standard, but they seem like they don't have any problem's besides very ugly code when you view it.
is there a better way? I really run into troubles trying to float things.
stevie_d — 2011-03-15T19:09:12-04:00 — #2
It isn't just that the code is "ugly", it's that it often fails to work quite spectacularly.
We had a big discussion about this recently, which you can read at http://www.sitepoint.com/forums/css-53/why-switch-table-css-layout-721289.html. If after reading that, you've got anything more you want to say, probably best to add it onto the end of that debate rather than start another one here.
Essentially - tables for layout are bad because:
- they usually need a lot more code to achieve the same effect
- they are a maintenance nightmare if you ever need to add, delete or change anything
- they don't play nicely with print stylesheets, mobile browsers or accessibility technology
- there's previous little that you can do with tables that you can't do without, and there's a lot that you can do with CSS that you can't do with tables. It's just a case of learning a different way of doing things.