Re:Ask HN: Why does this site use center and table tags?
by hartleybrody on Monday August 13, 2012 @01:27PM
(#4376967)
> I will admit to being driven near raving mad trying to make CSS do things that were dead simple using a table.
Definitely true. I'm usually in the semantic+CSS camp, but for lots of simple projects (which I'd say HN is) those considerations can really bog you down. Use tables -- knowing they're suboptimal in certain situations -- and get on with it.
Re:Ask HN: Why does this site use center and table tags?
by Johngibb on Thursday August 23, 2012 @11:43PM
(#4426078)
When data is tabular, tables make sense. I think there's been a lot of brainwashing that tables are evil; really, it's just that tables aren't ideal for layout.
If you've got a page with tabular data, use the table tag! It's semantically valid and a concise way to get the proper formatting!
But, if you're trying to lay things out - it's likely a grid layout will do the job better. Straight CSS is pretty hard to get right with all the floats, but starting with a grid system and especially something even higher level like Twitter Bootstrap can really be productive. Note, however, that bootstrap still supports and encourages tables when it makes sense.
Re:Ask HN: Why does this site use center and table tags?
by vampirechicken on Friday August 24, 2012 @11:24AM
(#4427989)
I agree. My point was that pre-css-grid, it was easier to use a table to build a pages's layout than it was to figure out the wibbly-wobbly divvy-floaty stuff.
However, CSS has, in the past, been extremely annoying to use if you want a simple tabular layout to your web site.
As other's have, or will point out, the table tags can end up being more data that you'll download each time the page contents are sent, whereas css, if you do it correctly - in a file external to the HTML - will only be downloaded one time, saving bandwidth and time.
If the site's author doesn't care about the SEO demerits of using a table, then she's not going to spend the time converting the site. This has the side effect of annoying semantic HTML purists, who believe that the HTML should only describe the content and only CSS should be used to apply styling.
While the semantic+CSS camp has a fair point, I will admit to being driven near raving mad trying to make CSS do things that were dead simple using a table. So I empathize with the people who don't want to spend large amounts of time figuring out how to make CSS do what they mean.