Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Are there CSS Subclasses? 1

Status
Not open for further replies.

okiiyama

IS-IT--Management
Jan 3, 2003
269
US
This isn't fully thought out.. sorry.

What I would like to do is create (in this example)
to tables with 2 different styles

Example:
Table 1
Background-color: #eeeeee;
border: 1px solid #666666;
Td for Table 1
padding-left: 15px;
padding-right 32px;

Table 2
Background-color: #eeeeee;
border: 1px solid #666666;
Td for Table 2
padding-left: 64px;
padding-right 10px;

I would like to only declare the table's class name and not the td tags' class name, but I would like the style defined for table1s table cells to be applied to each of the cells without needing to declare the class for each table cell.

Make Sense? Maybe its not a good idea. please let me know if there is a way though.

Thanks.

 
If i understand you correctly You can do something like:

.tableoneclass{
...
}

.tabletwoclass{
...
}

.tableoneclass td{
...
//[green]the stylings here will apply to all td's inside an object with the class tableoneclass[/green]
}

.tableoneclass td{
...
//[green]the stylings here will apply to all td's inside an object with the class tabletwoclass[/green]
}


----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top