Sorry if this is an often asked question, but all of the threads that the search throws up are very old.
I have a very big site. 2,500 pages of html that is not in a database. It uses Dreamweaver templates and css. I am about to re-design it, and I keep on reading that I must dump my tables. Now I use tables to index the pages in many different orders. So I would have maybe 30 to 50 pages, of 100k each, and hundreds of rows on each page. Almost all three column. All full of hyperlinks to pages.
I just spent half an hour trying a recommendation I found here: Tableless layout HOWTO and I found it a total waste of my time.
Yes that will create three columns. But it won't create rows of data, unless I use absolute referencing for each row. And that is not going to work.
So my question is: In 2011, is it still the advice that all tables are bad? Or is this just the opinion of folks who don't have to solve the problem I have?
I have a related problem in that it seems many CMS do not offer tables, but I can probably get around that by customisation.
If you are telling me I really should replace my tables, please point me to an example, with code, that will be feasible in replacing literally hundreds of rows on each page.
Hi geoffc8. Welcome to SitePoint.
that will create three columns. But it won't create rows of data, unless I use absolute referencing for each row. And that is not going to work.
Tables are appropriate for tabular data, so if that's what you have, then a table should be used. But otherwise, there are better ways to lay out a page.
We'd really need to see what your layout requires to be able to suggest how to code it. Can you post a screen shot of a typical page, or a link to one of your table-based pages?
OK, that's an example where table element is appropriate—but only for the Author/Title/Date section. The rest of the page should not use tables for layout.
Tables are not bad, per se. Every element has its proper use. It's just that tables were never meant for page layout, and now that CSS is supported in browsers, there's no need to misuse tables like that any longer.
It would be good for you to read up on the proper uses of tables, though. For example, the headings of each column should be marked up with <th> rather than <td> etc.
Thanks a lot. That helps me move on.
This topic is now closed. New replies are no longer allowed.