Results 1 to 3 of 3

Thread: tables id

  1. #1
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Default tables id

    Hi

    if I have few tables on my page and I want that every table will have it's own style what should I write in my css file?

    sorry it's a silly question, I just forgot it

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Basically, you have to have a unique id on every table.

    With that said, if you the id of table 1 (for instance) is table1, which should look like this:
    Code:
    <table id="table1"><tr><td></td></tr></table>
    Then, style it in your CSS by the basic rule:
    Code:
    /*selector{property:value}*/
    #table1{background:#fc0;}
    Sidenote, if you are designing the page, then stop using tables - it was'nt intended for layouts.

    Hope that makes sense and thus keeps you going.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. The Following User Says Thank You to rangana For This Useful Post:

    lord22 (07-30-2008)

  4. #3
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Default

    thanks

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
  •