0

I have a horizontal CSS menu that has the following HTML structure.
<ul>
<li><a class="top_link">Item 1</a></li>
</ul>

I would like to know what the difference is between the following two CSS codes and what they do. (top_link is the class name I have given to the a tag) I am especially confused about the second one.

li a.top_link :hover
li:hover > a.top_link

Thanks

4
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by sreein1986
0

Second one is working as a default hyper link. it's working like default link "a.top_link" and a.top_link:hover will show u the result when u will put ur mouse over on the link. If u will remove "a.top_link' from ur stylee then "a.top_link :hover' will not work anymore.

0

I have a horizontal CSS menu that has the following HTML structure.
<ul>
<li><a class="top_link">Item 1</a></li>
</ul>

li a.top_link :hover
li:hover > a.top_link

Thanks

a:link	{ color: #898989; text-decoration: none; } /* link normal*/
a:visited	{ color: #898989; text-decoration: none; } /* previously visited link*/
a:hover	{ color: #d3d3d3; text-decoration: underline; } /* mouse over the link*/
a:active	{ color: #d2d2d2; text-decoration: none; } /* onclick the link*/

hope that answers you

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.