SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: id and class

  1. #1
    SitePoint Evangelist jkh1978's Avatar
    Join Date
    May 2001
    Location
    Northern Virginia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    id and class

    Can I give an id and class name to the same object?

    What I have is a set of tables that I hide and show with jaascript to look like tabs.

    Right now they all have different ids for the javascript to work, and I list all the ids in the css. Is there a way to only list one class to describe all the tables?

  2. #2
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've never tried it. I would think that it would work, but you would probably be better off giving them unique names.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  3. #3
    SitePoint Member Shayla_Jade's Avatar
    Join Date
    Sep 2001
    Location
    Colorado, USA
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One of the things you can do is to put all of the common traits of the various tables into a class and have the traits that are not common to each table as an id for that table or for the td cell. Basically you're asking if you can do this:
    Code:
    <table id="different" class="commons"><td></td></table>
    Right? Just put all the traits that are common to your tables together in one class name and have the traits that are different (like the table placement) in id's putting all the traits you want for that one table as one id name, then putting all the traits for the next table as another id name, etc. I hope that's what you were asking. If not I'm sorry but I hope you get your answer soon Good luck with it


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
  •