SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    When is it right to use tables?

    Hi all,

    I finished my first ever pure CSS table-less design a week or so ago now. However I'm still in the process of 'learning the ropes' in terms of this method of design.

    My question is, when it's right to use tables instead of DIVs. I know a few people who say that it's like Pick-n-Mix and you decide what to use in your situation, but I'm looking for more of a solid answer than this.

    Answers would be much appreciated

    -Sam
    Sam Hastings

  2. #2
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use tables when you want to mark up tabular data (say, make lots of numbers look like a spreadsheet for example. You wouldn't use Excel to put images beside each-other for example (though you could try ))

    Douglas
    Hello World

  3. #3
    SitePoint Member byss's Avatar
    Join Date
    Sep 2002
    Location
    Central Kentucky, USA
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A general good rule of thumb is to see if you need to compare the values within each table's row/column. If you do, a table is a good choice. This goes for numbers or text, as long as the data is of the same type and needs to be compared.
    Caution: Slow Children At Play -->

  4. #4
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.w3.org/TR/WCAG10-HTML-TECHS/#tables


    "...wouldn't use Excel to..." ?
    Douglas, you have no idea what people are able to do with Excel, one time I saw someone using Excel instead of Word for documents with text only

  5. #5
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jofa
    "...wouldn't use Excel to..." ?
    Douglas, you have no idea what people are able to do with Excel, one time I saw someone using Excel instead of Word for documents with text only
    I've got to be optimistic about the people who ask questions over those who just spew ... ... less than good websites

    Douglas
    Hello World

  6. #6
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tabular data or for noting down lists of past sexual conquets.

  7. #7
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I've used tables for two things since going XHTML.
    1. A calendar, and
    2. A grouping of data much like this:

    Code:
    ID       |Price    |Date
    4543     |$102.98  |5/26/2003
    3415     |$312.34  |6/4/2002
    etc.

    If you don't have data that fits into a similar format, there's probably no need for a table.

  8. #8
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sh0t
    ...for noting down lists of past sexual conquets.
    Isn't <ol> better for lists?

  9. #9
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by jofa
    Isn't <ol> better for lists?
    I prefer <ul> with a custom bullet

  10. #10
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sh0t
    tabular data or for noting down lists of past sexual conquets.
    Naa, that's a <dl>, like so:

    Code:
    <dl>
    <dt>The Good</dt>
    <dd>Ooh</dd>
    <dd>Aah</dd>
    <dd>mmmh</dd>
    <dt>The Bad</dt>
    <dd>Yummy!</dd>
    <dt>The Ugly</dt>
    <dd>Your search returned no results!</dd>
    </dl>


    Douglas
    Hello World

  11. #11
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by DougBTX
    Naa, that's a <dl>, like so:

    Code:
    <dl>
    <dt>The Good</dt>
    <dd>Ooh</dd>
    <dd>Aah</dd>
    <dd>mmmh</dd>
    <dt>The Bad</dt>
    <dd>Yummy!</dd>
    <dt>The Ugly</dt>
    <dd>Your search returned no results!</dd>
    </dl>


    Douglas
    I think your search script is messed up

  12. #12
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vgarcia
    I think your search script is messed up
    Oh, I'm terrible with names
    Hello World

  13. #13
    Ceci n'est pas Zoef Zoef's Avatar
    Join Date
    Nov 2002
    Location
    Malta
    Posts
    1,111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sh0t
    tabular data or for noting down lists of past sexual conquets.
    I do hope you give that table some rounded corners.

    Rik
    English tea - Italian coffee - Maltese wine - Belgian beer - French Cognac

  14. #14
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Zoef
    I do hope you give that table some rounded corners.
    Rik
    ...and that you use this method to make the corners rounded
    http://www.w3.org/TR/2002/WD-css3-bo...-border-radius

    OK, that will not work in any browser today, but -moz-border-radius works in - well, Mozilla of course


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
  •