Reputation: 139
I'm trying to format some links within an unordered list using an external stylesheet, when the links are moused over they should increase in size and be displayed blue. My syntax is below:
HTML
<ul>
<li>
<a href="#dejaview"><img src="imgs/dejaview_lft.gif" width="95px" height="75px" alt="Dejaview"
title="Click for more info"/>Dejaview</a>
</li>
There are three more links below this before the UL ends
Stylesheet
ul.a:hover
{
font-size: 200%;
color: blue;
}
What am I doing wrong here, I can't work it out.... I have tried both li.a:hover and what is currently above, and I was under the impression that if I wanted to change the format for all links within a list I didn't need to create a class for them. I could be wrong though, I'm a n00b to CSS
Thanks
Rick
Upvotes: 1
Views: 412
Reputation: 1588
Your CSS is wrong. You need to edit like below.
ul a:hover
{
font-size: 200%;
color: blue;
}
ul.a:hover will work when your code like below; '.' means 'class'.
<ul class="a">
<li>hi</li>
</ul>
Upvotes: 1
Reputation: 92
ul li a:hover
{
font-size: 200%;
color: blue;
}
Should work
because the dot '.' in before 'a' stands for a class called 'a'
Upvotes: 2