Table-less Layouts
Tuesday, May 05 2009 - asp-net-css
I’ve spent the last few years driving away from the endless use of tables to define layout. Each project I’ve been on, I’ve managed to push farther and farther away. It’s been a painful, frustrating experience, but at this point I’m far better at it than I would be at using tables.
On a current project I’m looking at using an open source forum. Digging into the code, I find that not only is everything table based, but most of the tables have styles hard coded. Adding insult to injury, there is no consistency in how attributes are named, used, nor whether something is CSS based or inline.
Take a look at this mess:
You’ve got single quote, double quote and no quote. Styles are defined in the page (note this is a compiled class, not even HTML) and styles are defined in CSS. Frankly, this sucks. I’ve written some mangled code in my time, but this is a well known forum software we’re talking about. OSS projects are better; more eyeballs and all that crap, right? Yes, I know I can fix it, but of course I have neither the time, nor the motivation to rewrite something this huge.
Honestly, I blame Microsoft for the continuing prevalence of this kind of crap. The tools should prevent you from making these types of poor decisions instead of encouraging it via drag and drop and zero validation.
