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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table css in one declaration

Status
Not open for further replies.

tinapa

Technical User
Nov 12, 2008
81
GB
hi, i want to have a template table so that when i make a new table i just define this new table with a class=mytablecss and i want it to inherit the properties of a table defined in my css file. and i want to have a different background image for each and every td.

example is:

<table class="mytablecss">
<tr><td> 1 </td></tr>
<tr><td> 2 </td></tr>
<tr><td> 3 </td></tr>
</table>

how do i define this table in css?

thanks
 
Put a class on each td then set the background image for each in your css file.

Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
I would use ids rather than classes, if you want each td to have a unique picture.

What on Earth are you going to do with it anyway? For a template it sounds like it is going to be very specific.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top