CSS Tables Question

Discussion in 'CSS' started by jawinn, Feb 25, 2008.

  1. #1
    I have a style.css that looks like it already has an area for tables in my site. I need to have tables with different attributes like cellspacing and cellpadding. How do I have 2 different CSS entries for tables?

    thx,
     
    jawinn, Feb 25, 2008 IP
  2. Ascendancy

    Ascendancy Active Member

    Messages:
    1,721
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    90
    #2
    If you give the other table an ID, you can then edit it in the CSS by doing something like:

    
    #secondTable {
        /** Styles for second table **/
    }
    
    Code (markup):
    If you wanted to add a padding to all of the td's in only the second table, you could do this:

    
    #secondTable tbody tr td {
        /** Styles for second table **/
    }
    
    Code (markup):
    I hope this answers your questions and that I didn't mis-read it.
     
    Ascendancy, Feb 25, 2008 IP