I'm trying to make this look pretty, but I've run into a problem. I have a span element containing a Subtitle or short description inside the anchor tag. Unfortunately it's styled the same way as the anchor, which is not how I want it to be. I've tried applying styling to the span itself but they seem to be overridden by the anchor styles. The problem is that I don't want it to be underlined when the link is hovered over.
Here's my html.
<ul>
<li><a href="#">A <span class="subTitle">Subtitle</span></a></li>
<li><a href="#">B <span class="subTitle">Subtitle</span></a></li>
<li><a href="#">C <span class="subTitle">Subtitle</span></a></li>
<li><a href="#">D <span class="subTitle">Subtitle</span></a></li>
<li><a href="#">E <span class="subTitle">Subtitle</span></a></li>
</ul>
And my CSS
#leftNav ul li { position: relative; }
#leftNav ul li a span.subTitle
{
bottom: 4px;
color: #000000;
display: block;
font-size: 12px;
left: 10px;
position: absolute;
text-decoration: none;
}
I've tried styling the span itself, which doesn't seem to have any effect. Placing the span outside the anchor, relative to the li doesn't work either. the span blocks the hover event of the anchor and it isn't clickable.