troubleshooting Question

Apply css style to tag contains another tag with class

Avatar of Zado
ZadoFlag for United Kingdom of Great Britain and Northern Ireland asked on
CSSHTMLjQuery
7 Comments1 Solution449 ViewsLast Modified:
Hello Experts!


I have code like so:
<table>
	<tr>
		<td><a href="#tab1" class="active">Weather forecast manager</a></td>
        	<td><a href="#tab2">ENC manager</a></td>
        	<td><a href="#tab3">List of lights manager</a></td>
		<td><a href="#tab4">Radio signals manager</a></td>
                ...
	</tr>
</table>
And I have jQuery code adding class="active" to chosen "a" tag.
What I need is CSS "td" tag contains "a" tag with class="active". I tried already
td[a.active] {
 background-color:#666;
}
...but doen't work for me.


Thanks for any help or hint.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros