I can’t figure out how to style an H2 link in css. I’ve tried everything. IHow I can I target the link in an h2 element?
<div id="post-225" class="post-225 post type-post sticky hentry category-rugby-world-cup tag-land-rover-rugby-world-cup-2011-rugby-world-cup-2015-land-rover-rugby">
<h2><a href="http://blog.landrover.com/events/rugby-world-cup/england-rugby-squad-vs-media-driving-challenge-day" title="Permalink to England Rugby Squad vs. Media Driving Challenge Day" rel="bookmark">England Rugby Squad vs. Media Driving Challenge Day</a></h2>
I need to make the headline of this sticky post white:
I’ve tried .sticky h2 a {color:white;} but without success.
Any help would be greatly appreciated.
Thanks
Your
.sticky h2 a {color:white;}is being overridden by the main style:To target the specific h2 of the sticky class, use: