Reputation: 987
Is there any way I can assign a css class to a table cell merely based on its header attribute?
The code is generated dynamically through a CMS so it's a little difficult to change, and it basically looks like this:
<td headers="blue">
How can I assign the style below to the td?
{
background-color: #1374bf;
}
Upvotes: 2
Views: 1401
Reputation: 2777
You can use the css attribute selector.
td[headers="blue"]{
background-color: #1374bf;
}
Upvotes: 3