CSS/DIVvsTABLEs (Why Divs when tables work, in all browsers)
Posted: Sun Sep 09, 2007 3:10 pm
A while back I started a thread about the merits of CSS vs. TABULAR layout. It was a great discussion and I was learning tons...before it got locked down because of abuse by some idiots.
Here's the link to the original thread: Why Divs when tables work, in all browsers
So I'm starting it again with my original rant:
What's all the fuss about using divs and how divs are so much better because css is the "wave" of the future, part of the 2.0 world of the web?????
I don't get it. I can spend literally HOURS more pushing pixels around in the individual browsers when using css/div's; causing me severe headaches. Why, why, WHY would you people out there who are div/css fanatics suggest that divs/css is better when we all know that IE has to be hacked?
Please. I really want to hear some intelligent conversation on this because I am sick of our designers designing table-less websites that don't work in every browser making me sit here for hours pixel-pushing until I'm ready to break my laptop in a dozen little pieces out of frustration. (They don't do the testing they should)
I can fix a problem in a tables about 20x's faster than I can using css/divs. The unpredictability is what makes css/div's lame. You can say it's a microsoft issue, but what you're dealing with is a "new technology" that HASN'T come into it's own yet.
I like to call css "certifiably sucky syntax" for good reason. Where data and layout is concerned, we use the term "tabular data" when we're supposed to use a table. But wo unto the user that uses a table for layout purposes. Before you get all heated about the merits of designing for screen readers, etc, let's talk about how difficult and how much of a hack it is just to get a 3 column layout on a page is. I've spent the better part of my morning reading about all sorts of ways of hacking it, when what all we need for centering in the table world is align="center". In the css world, you have to say "margin: 0px auto;" and then create a separate div just for microsoft and have "text-align: center"; for content just to line up. People "margin: 0px auto" is not straight forward. It's a hack. Just to center content in a div, you have to hack!!!! Unbelievable!!!
With tables it's straight forward. You have columns that are controllable, containable, and listen to your every markup. In css this isn't accomplished without about a half dozen hacks, or more when you consider IE's box object model issues.
In my opinion, the largest problem with a div is it's default behavior to span the entire screen, instead of, like a table, wrap around the content.
It's not even straight forward how to even come up with multi-column layouts(> 2). Why is this so? I haven't a clue. What we need is CSS to be redesigned, from the ground up, to include layout's like a table but readable by every form of technology out there.
All layout is a form of tabularizing(is that word) data/images/etc, so what is the big deal with css being touted as the only "right" way to do it? If you ask me, what we have here is a standards problem. Whatever the standard, give it to me straight and make it easy to understand. None of the object model hack crap and endless work-around garbage.
In the end, what I do is use a combination of both because css has a lot of cool positioning features that tables don't. The best of which was getting rid of the 1 pixel gif in favor of actual positioning syntax. So, from now on, (and in order to make some money for my company...and it's all about the $$$) I stick to the tables for multi-column layouts, and use as much css as possible for the other content. There's no sense in wasting time and money waiting for the world to come around to straight-forward, easy to understand, quick to implement, syntax. ...because that would be too easy.
I'm so still old school on this one. Give me tables or give me death!
Thanks for listening to me rant.
Here's the link to the original thread: Why Divs when tables work, in all browsers
So I'm starting it again with my original rant:
What's all the fuss about using divs and how divs are so much better because css is the "wave" of the future, part of the 2.0 world of the web?????
I don't get it. I can spend literally HOURS more pushing pixels around in the individual browsers when using css/div's; causing me severe headaches. Why, why, WHY would you people out there who are div/css fanatics suggest that divs/css is better when we all know that IE has to be hacked?
Please. I really want to hear some intelligent conversation on this because I am sick of our designers designing table-less websites that don't work in every browser making me sit here for hours pixel-pushing until I'm ready to break my laptop in a dozen little pieces out of frustration. (They don't do the testing they should)
I can fix a problem in a tables about 20x's faster than I can using css/divs. The unpredictability is what makes css/div's lame. You can say it's a microsoft issue, but what you're dealing with is a "new technology" that HASN'T come into it's own yet.
I like to call css "certifiably sucky syntax" for good reason. Where data and layout is concerned, we use the term "tabular data" when we're supposed to use a table. But wo unto the user that uses a table for layout purposes. Before you get all heated about the merits of designing for screen readers, etc, let's talk about how difficult and how much of a hack it is just to get a 3 column layout on a page is. I've spent the better part of my morning reading about all sorts of ways of hacking it, when what all we need for centering in the table world is align="center". In the css world, you have to say "margin: 0px auto;" and then create a separate div just for microsoft and have "text-align: center"; for content just to line up. People "margin: 0px auto" is not straight forward. It's a hack. Just to center content in a div, you have to hack!!!! Unbelievable!!!
With tables it's straight forward. You have columns that are controllable, containable, and listen to your every markup. In css this isn't accomplished without about a half dozen hacks, or more when you consider IE's box object model issues.
In my opinion, the largest problem with a div is it's default behavior to span the entire screen, instead of, like a table, wrap around the content.
It's not even straight forward how to even come up with multi-column layouts(> 2). Why is this so? I haven't a clue. What we need is CSS to be redesigned, from the ground up, to include layout's like a table but readable by every form of technology out there.
All layout is a form of tabularizing(is that word) data/images/etc, so what is the big deal with css being touted as the only "right" way to do it? If you ask me, what we have here is a standards problem. Whatever the standard, give it to me straight and make it easy to understand. None of the object model hack crap and endless work-around garbage.
In the end, what I do is use a combination of both because css has a lot of cool positioning features that tables don't. The best of which was getting rid of the 1 pixel gif in favor of actual positioning syntax. So, from now on, (and in order to make some money for my company...and it's all about the $$$) I stick to the tables for multi-column layouts, and use as much css as possible for the other content. There's no sense in wasting time and money waiting for the world to come around to straight-forward, easy to understand, quick to implement, syntax. ...because that would be too easy.
I'm so still old school on this one. Give me tables or give me death!
Thanks for listening to me rant.