#1
  1. No Profile Picture
    matthewdoucette.com
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2002
    Posts
    635
    Rep Power
    13

    listing of all table-related css variables


    where can i find a listing of all table-related css variables?

    i'm not even sure if there are table-related css variables, but it would be nice to set cellspacing and cellpadding only once at the top of the html file.

    thx,
    Matthew Doucette / Xona.com
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    19
    There are some specific Table attributes:
    http://www.blooberry.com/indexdot/cs...ndex/table.htm

    but you can use attributes from other properties, e.g. Colour & Background, BOX, Text, Positioning.

    http://builder.cnet.com/webbuilding/...ref_l.bl_table
    http://www.webreview.com/style/css1/...stergrid.shtml
  4. #3
  5. superficial
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Location
    Peterborough, England
    Posts
    188
    Rep Power
    13
    http://webref.info

    select css from the left frame

    find the tables section.
    _______________
    Matt
  6. #4
  7. No Profile Picture
    matthewdoucette.com
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2002
    Posts
    635
    Rep Power
    13
    i'm having problems implementing multiple table css's. i can do it for just one table, like this:

    <style>
    TABLE
    {
    border: ffffff 1px solid;
    FONT-SIZE: 8pt;
    COLOR: ffffff;
    FONT-FAMILY: verdana, arial, ms sans serif;
    background-color: midnightblue;
    }
    TH
    {
    padding: 5px;
    border-bottom: ffffff 1px solid;
    background-color: darkblue;
    }
    TD
    {
    padding: 5px;
    background-color: darkblue;
    }
    -->
    </style>

    but how do i make seperate table/th/td properties for use in another table?

    i know it has something to do with classes (which i have implemented no problem for fonts) but i have no idea how to do it for tables.
    Matthew Doucette / Xona.com
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    19
    you can assingn a pseudo class to the CSS.

    Code:
    TD.red { background-color: red}
    
    
    <td style="red">this is a table cell</td>
    You could just use
    Code:
    .red { background-color: red}
    but using TD.red means that you can use the name red for other styles aswell, such as TABLE.red, TH.red etc.
  10. #6
  11. No Profile Picture
    matthewdoucette.com
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2002
    Posts
    635
    Rep Power
    13
    so your top example makes all TD's red (by default), and gives you the ability to use .red elsewhere.

    and the bottom example makes nothing red, and gives you the ability to use .red elsewhere.

    am i right?


    so i can't make 2 classes, with each class having 'table', 'th', and 'td' properties all in the same class? in other words, i can't use code such as this: <table class="firstclass" ...> to define properties in 'th' and 'td' as well as 'table'?
    Matthew Doucette / Xona.com
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    19
    TD {background-color: red}
    This would effect all TD's.

    TD.red {background-color: red}
    Using TD.red is a specific class for TD's.
    This will only effect TD's that are assigned the class.
    e.g. <TD Style="red">



    example
    ----------

    <style>
    TD {background-color: green}
    TD.red {background-color: red}
    TD.blue {background-color: blue}
    </style>

    <table>
    <tr>
    <td>This cell has no assigned style. It will default to Green</td>
    <td style="red">This cell is red</td>
    <td style="blue">This cell is blue</td>
    </tr>
    </table>
    Last edited by degsy; June 5th, 2002 at 10:38 AM.
  14. #8
  15. No Profile Picture
    matthewdoucette.com
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2002
    Posts
    635
    Rep Power
    13
    excellent, thanks for your help.
    Matthew Doucette / Xona.com

IMN logo majestic logo threadwatch logo seochat tools logo