I have to sections (seperated by div classes) and I need to highlight the h1 and h2 sections in different colours in both sections. In each section I have a h1 and two h2s. This is the css I have for them:
CODE
.europe h1, h2 { background-color: black; color:white; }
.africa h1, h2 { background-color: orange; color: blue; }
#image1 { float: left; }
#image2 { float: left; }
The colours seem to override each other even though they are in seperate divs? For example, right now its showing the first h1 as black but the following h2s as orange, and the africa section is all orange.
This is my html
CODE
<div class="europe">
<img src="exercise1map1.jpg" id="image1"/>
<h1>Europe</h1>
<h2>France</h2>
<p> Blah blah blah. </p>
<h2>Lithuania</h2>
<p> Blah blah blah. </p>
</div>
<div class="africa">
<img src="exercise1map2.jpg" id="image2"/>
<h1>Africa</h1>
<h2>Zimbabwe</h2>
<p> Blah blah blah. </p>
<h2>Burundi</h2>
<p> Blah blah blah. </p>
</div>
</body>
It's meant to look like the image attached.
This post has been edited by irishgirl: 30 Oct, 2009 - 10:51 AM