Struggling with a formatting issue here. I'm looking to customize the colors of h1, h2, h3... when they are inside specific classes. It's mostly working as intended, however, the problem arises when the headings outside of those classes don't always revert back to their original color. Any suggestions on how to fix this? Here's the snippet of my code:
CSS:
.white_rectangle,.extras h1,h2,h3,h4,h5,h6{
color: navy;
}
I want all h1, h2, etc. inside these classes (white_rectangle and extras) to have navy color. For any other instances, I've set the following:
h1, h2, h3, h4, h5, h6 { color: red; font-weight: normal }
HTML:
<h1>Before</h1>
<h3>Before</h3>
<table class='extras'>
<tr><td><h1>Text Inside Class</h1></td></tr>
</table>
<h1>After</h1>
<h2>After</h2>
Fiddle: http://jsfiddle.net/y5hg8ke5/
The goal is for the "Before" and "After" text to be in red, but it doesn't seem to be functioning correctly.