SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Fully Qualified Fool :) luke-innovative's Avatar
    Join Date
    Jun 2002
    Location
    Kent, UK
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Tables-CSS Question

    Hi,

    I'm using CSS for my tables, this is the code I am using atm:
    Code:
    table {
    border-collapse: collapse;
    border: 1px solid #BBBBBB
    }
    td {
    background:#F8F8F8;
    border:1px solid #BBBBBB;
    padding:2px
    }
    td.grey {
    background:#EFEFEF;
    padding:2px
    }
    I want to be able to have different tables on certain pages, but when I create a table it automatically uses the table{} style so they all end up looking the same. Just wondered if its possible to have different tables on the same page.

    Thanks
    Luke
    Luke-Martin.com (work in progress) :: Independent Web Designer's Portal
    Freelance Forums :: Sign Up Here
    "What happens if you get scared half to death twice?"

  2. #2
    SitePoint Wizard iTec's Avatar
    Join Date
    May 2001
    Location
    Sydney, Australia
    Posts
    2,243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yep, just use a class in the table, ie:

    table {
    border-collapse: collapse;
    border: 1px solid #BBBBBB
    }

    table.different {
    border-collapse: collapse;
    border: 1px solid #443311
    }

    and then
    <table class="different">

  3. #3
    Fully Qualified Fool :) luke-innovative's Avatar
    Join Date
    Jun 2002
    Location
    Kent, UK
    Posts
    256
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks!

    ahh right thanks
    Luke
    Luke-Martin.com (work in progress) :: Independent Web Designer's Portal
    Freelance Forums :: Sign Up Here
    "What happens if you get scared half to death twice?"


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
  •