For the CSS fanatics, do you use tables for tabular data?
Written By jbarket on Mar. 19, 2007.
25 Comments
Report Note
+ Clip This
Hey guys,
Here's one that's been driving me crazy lately.
I use CSS for layout, formatting, all of that good stuff... everything, right down to forms and simple tabular data... but I've been wondering if perhaps I'm making things more difficult on myself in an effort to not use tables.
So, for tabular data (big bunch of columns and such), forms, whatever... what's your opinion on the usefulness of tables in this day and age?
RightOn
Written Mar. 19, 2007 / Report /
Tables were invented for "Excel" like data....
If you're making a price list, or a comparison chart etc... USE a table.
The only thing that's really looked at as "old and outdated" from Tables is layout use.
I think you would be making things harder on yourself if you DIDN'T use tables for tabular data.
Scrivs
Written Mar. 19, 2007 / Report /
Simple answer: yes.
dreamweaver
Written Mar. 19, 2007 / Report /
Yes.
Oli
Written Mar. 19, 2007 / Report /
Most CSS fanatics are semantic fanatics.
The idea is that you use the tags for what they mean. Layouts are not tabular data, so you don;t use tables... Tabular data is tabular data so you use tables.
Rich
Written Mar. 19, 2007 / Report /
Any form of tabulated data should be put in a table. Even the most hardcore CSS geek will tell you that.
It's not inefficent or a "bad idea" not to, it's just plain wrong.
Ozone42
Written Mar. 19, 2007 / Report /
Yes! Absolutely!
jbarket
Written Mar. 19, 2007 / Report /
Thanks for making me feel better guys <3
I was starting to feel like we'd all lost our minds for a minute.
jmathias
Written Mar. 19, 2007 / Report /
Always and forever, what else would we use?
Devin
Written Mar. 19, 2007 / Report /
Nested divs. Mmmm. :)
dreamweaver
Written Mar. 19, 2007 / Report /
Well, I have done the nested divs thing too on occasion, simply because it was a small-ish table, and that seemed just as logical at the time. For anything with LOTS of data though, tables still make sense. Unfortunate. I still don't like tables...even if they do make sense on rare occasions (I don't do too much with tabular data, thankfully!).
alexsuraci
Written Mar. 19, 2007 / Report /
There's absolutely nothing wrong with tables. The only thing wrong is the people that used to use them for their wrong purpose. :P They've been perfect from the beginning, pretty much, you just need to use them in the places they're meant for.
posure
Written Mar. 19, 2007 / Report /
What Oli said. ;-)
The only time I don't use tables for tabular data is for the rare case that I change how the data is viewed dynamically on the client-side, in which case I would use an unordered list.
rick
Written Mar. 20, 2007 / Report /
tabular data <- tables :D
Craige
Written Mar. 24, 2007 / Report /
Yes, of course.
arthus
Written Mar. 24, 2007 / Report /
I use tables for tabular data. However, I have a strict definition of what is tabular data. Basically, it has to make sense to be in a spreadsheet. This pretty much knocks out most forms - that is because most forms only show association between two elements (the label and the field). However, I think that tables require headings which apply to multiple elements.
Basically, if it is tabular data (like scores, comparisons, and grades), then I use a table. Otherwise, I refuse to use tables (including for forms)
Here's my requirements to use a table:
-both column and row headings
-multiple values associated with each heading
-not for layout
Oli
Written Mar. 24, 2007 / Report /
The things I've used people use spreadsheets for in a corporate environment... I'm not sure that's the best benchmark for everybody =)
Lugat
Written Mar. 30, 2007 / Report /
I always try to put tabular data into lists and format them with CSS. If the "tables" are small and don't contain much data, it's easy to use lists instead of tables. If you have a lot of tabular data it's really better to use tables for them.
Article19
Written Mar. 30, 2007 / Report /
we use a piece of free code from Veerle Pieters. Very smart and adaptable, all you need to do is provide a link back or if you want to learn it's great to play with and develop.
MangoFalls
Written Mar. 30, 2007 / Report /
While I agree with the overall opinion that tables have a place in css designs, I'd sugggest putting things in context of scale. If you're only going to be displaying a few rows and columns I'd probably stick with pure css but if the data set is large, tables would be the way to go.
Oli
Written Mar. 30, 2007 / Report /
No no no no no. You're bad people.
Tables for tabular data.
Lists for lists.
There's a reason we're trying to take the web in a semantic direction!
RightOn
Written Mar. 30, 2007 / Report /
tabular data is tabular data wether it's a 3x3 grid or a 3x540 grid...
a list is a list... spreadsheet data is spreadsheet data.
They're not the same thing when looking at it from a 'semantic information' pov...
stephentrepreneur
Written Mar. 31, 2007 / Report /
Yes, Use tables for tabulated data.
But use external CSS to format the table and the data!
ipearx
Written Apr. 1, 2007 / Report /
For a web application I use CSS layout wherever possible, but if the CSS way is tricky and tables will be quick and easy I'll quite happily use them. Also handy if you need a particular behaviour on a liquid layout, for example the tabs at the top of bla.st.
I could have used CSS, but they would have to be right or left aligned rather than centred (bring on inline blocks!), and they would wrap rather than squeeze up when the window gets smaller.
bla.st/web-development/
Ozone42
Written Apr. 1, 2007 / Report /
Anyone have some good examples of styled up tables? I always have a lot of trouble being satisfied with the look of them.
isdereks
Written Apr. 1, 2007 / Report /
Veerle has a great tutorial to reference as an example.