Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 17
  1. #1
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    when are you suppose to use tablebody and table footer? And could you use one large table w/ th tbody and tfooter and then put all your content in the table body?.. just curious

  2.  

  3. #2
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Content... as in page content? Do I hear table layouting? *Draws sword*

    Basically you want to use them as they say. Use table headers (<th> if I'm not mistaken) for the column ids, normal cells for data in the body. You don't have to use a footer if you don't need one.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  4. #3
    Member Taffu's Avatar
    Join Date
    Dec 2006
    Posts
    34
    Member #
    14486
    <tbody>, <tfoot>, and <thead> are simply table description tags that help auto-align content within a table. The natural order is, obviously:

    thead
    tbody
    tfoot

    However, no matter how you list them inside your table, they will follow the natural order. For instance:
    HTML Code:
    <table border="1">
     <thead>
      <tr>
       <th>This is my left column</th><th>This is my right column</th>
      </tr>
     </thead>
     <tfoot>
      <tr>
       <th colspan="2">This is my Footer</th>
      </tr>
     </tfoot>
     <tbody>
      <tr>
       <td>Content for left</td><td>Content for right</td>
      </tr>
      <tr>
       <td>Content for left</td><td>Content for right</td>
      </tr>
     </tbody>
    </table>
    Technically, now no matter where the content is, it's going to be aligned in it's natural order of head-body-foot. However, I wouldn't recommend using these tags, as they're poorly supported by browsers and seldom used. I would avoid using tables for layout all together, and rely on using <div></div> tags for containers, utilizing CSS.
    Owner - http://www.project-guild.com (in development)

  5. #4
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    I always use the simple layout of

    HTML Code:
    <table>
    <tr><th>Title1</th><th>Title2</th><th>Title3</th></tr>
    <tr><td>000</td><td>111</td><td>222</td></tr>
    </table>
    for the few times I do use tables. Generally, tables are simple enough to customize that semantic markup is sometimes less important.
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  6. #5
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Use tables only for tabular data, and definitely use thead, tbody, and tfoot. Why? because they're semantic, as others have said, but there's also a bigger reason: browsers that know how to use them can use them well. Specifically, a browser like Firefox will typically, when printing the page, print the header and footer on each page so that these are visible on each page. This is a Good Thing (tm), and is only one of the useful effects you can achieve with thead and tfoot. Screen readers will also treat headers and footers specially.

  7. #6
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    okay so basically to organize our tabularcontent and thats it,


    how do you space your columns? is that colgroup span? or can you do that in css?

    heh steax no worries man, i am complete with CSS , actually not ver ygood w/ tables, b ut need to know for just tabular information

  8. #7
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    You can space your columns in CSS using widths for your td elements. You really only need to give the ths a width, though, and then the table will adjust everything else, as well.

  9. #8
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    ok cool,

    and is there a way to run IE on mac? or window software on mac? do any of you know how to do this?

  10. #9
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    The order is thead, tfoot, tbody. Don't ask me why but that's the correct (and valid) order.

    If you have an Intel-based Mac: http://www.parallels.com/
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  11. #10
    Senior Member kade119's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    532
    Member #
    14888
    Liked
    1 times
    thanks filbert.


    anyone know why a email link would bold when hovering?

    my css has font-weight normal, it's in a table structure.. but that shouldn't make it bold when i rollover... are there automatic defaults or something?


    another problem if someone could give me an example of a table layout to the following:

    table includes

    header that expands across the top

    2 lists of names

    list 1

    john jack shawn


    list 2

    sarah sally jenny


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:00 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com