Jump to content

Assigning Properties To Mutliple Td's


Hemlock
 Share

Recommended Posts

Would there be an alternative option to style multiple td's within an TR (not all but a couple) say for example the first 3 TD's in the code below other then assigning a class to each TD.

		<tr>			<td>data</td>			<td>data</td>			<td>data</td>			<td>data</td>			<td>data</td>			<td>data</td>			<td>data</td>		</tr>

Cheers in advance

Link to comment
Share on other sites

What you're looking for is some combination of child and sibling selectors. Unfortunately, the CSS specification is not as detailed as you would need for this, and sibling selectors aren't supported at all in IE6-7. So you're pretty much left with classes.If you're asking because you have a lot of tables or rows like this and want to simplify the process, then PHP might offer an automated solution. But if you don't already know PHP, this task may not be sufficient reason to go out and learn it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...