A few months ago (or is it years?), I’ve been awakened, so to speak, to the wonders of web design standards that guides (should guide) developpers who use HTML and descendants/friends to build web pages.
I was quite competent before. My stuff worked marvelously on IE browsers and great on Netscape. But I didn’t really follow standards.
A few friends talked to be about the wonders of W3C (which I knew but didn’t care much about). Eventually, the arguments went home and I went standard.
I even switched browsers to Firefox (which is a great browser, by the way – especially if you’re a developper).
However, I still often use IE. Because, I am part of planet earth and most of them do. There sadly is still a lot of web sites that follow the non-standards of Microsoft. Shame, shame, shame.
(Reality, reality, reality).
Working at following the standards, I came to see where Microsoft strayed away. There’s nothing wrong with extending the standard (or proposing extensions to the standard, like the folks at MS like to say). It’s annoying when the standard is just not followed. A thing wich the IE
browser is kinda fond of. Not too often, but often enough to instantaneously cause gray hairs to grow on many a developper’s head.
Firefox, on the other hand, follows the standards rather well. Not always – they’re only human. But they do it better than IE. And I like them for it.
Which usually ends up with the devleopper saying : screw the sensible design. I’m breaking this shit into tables.
(Yes, I’m speaking from experience).
But the thing I really wanted to talk about is tables.
See, if you read HTML evangelists, they’ll tell you that tables are evil. I (and many others) disagree.
I’d say tables are somewhat evil.
You can do alot of things in div tags. Tables are not always required.
But there’s a stupid thing in W3C that makes me wonder about that stuff and often sends me to tables.
Worse, it often sends me towards single-cell tables. It’s depressing.
This stuff is called: vertical alignment.
Vertical alignments don’t seem work in most block elements (including div). If they can work, I haven’t figured it out. And it’s driving me mad.
Often, I want to align text on the bottom of a div. I don’t want to ‘pad the text with an amount of pixels that’ll send it to the bottom’. I want to say, using CSS that ‘this piece of text goes on the bottom’.
Works fine in td using vertical-align. That’s all.
Sometimes, I have a piece of text, followed by a logo, followed by a piece of text. I want them all vertically aligned so their centers match.
Only one solution: a table.
I often waste so much time on trying to work around using tables and use a more sensible (and CSS-customisable) HTML design and end up just stuffing things in table that it’s making me wonder why I dropped out of using tables in the first place.
If there’s a trick I didn’t catch, please share!