I have the following problem. I would like the h1,h2,h3... colors to be different if they are inside certain classes. That works fine, but for the code above or below the div or table with that class, the color of the heading doesn't always revert back to the original one. How can I achieve this? Here is my code:
CSS:
.white_rectangle,.extras h1,h2,h3,h4,h5,h6{
color: navy;
}
I want this to be the color if I have h1, h2, etc. inside these classes - white_rectangle and extras. For all other instances I have 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/
I want the text "Before" and "After" to be red, but it doesn't seem to work properly.