Jump to content

Assigning Properties To Mutliple Td's


Hemlock

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...