I apply css to a specific tag, but it's not working. The following is my code: HTML:
<div id="content">
<div class="fixedwidth">
<p><span class="date">2 April 2014 Last update at 15:23</p>
<h1>Norwich 'explosion': Two people dead</h1>
<img class="headlineimg" src="pictures/headline.jpg" />
<div class="newsitem">
<p>Two people have died in a suspected explosion at an industrial estate in Norwich.</p>
<p><a href="">Protest shuts Heathrow Airport runway</a></p>
<p><a href="">Harman 'happy to be overruled' on cuts</a></p>
<p><a href="">Get poor pupils 'into schools early'</a></p>
<p><a href="">Bird flu confirmed at Lancashire farm</a></p>
</div>
</div>
</div>
css:
.newsitem a{
color:#1F4F82
text-decoration:none;
}
.newsitem a:hover{
text-decoration:underline;
}
Can anyone tell me what is wrong with my code? Thanks.
;
) in.newsitem a
rule sir.<a>
element, but instead every<a>
element contained within a<div class="newsitem">
. Apply theid=""
attribute to be more specific.