SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: tables and css

  1. #1
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    tables and css

    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.

    thanks,
    Geoff

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    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?

  3. #3
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    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.

  5. #5
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot. That helps me move on.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •