> 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.
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.
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.
Comments
> 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.
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.
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.