Friday, March 16, 2012

CSS a:hover attributes

Sometimes, attributes for a:hover or li:hover don't work well or don't work at all.
The quickest resolution that I found for this issue is to set the CSS parameter "a:visited to clear:both" - this should reset the attributes for a (link) or li (menu item) and also get rid of the default purple color of visited link.


If we''ll take a menu as an example we''ll see something like this:



.menu li
{
    color:Red;
}

.menu li:hover
{
    color:Black;
}

.menu li:visited
{
    clear:both;
}


No comments:

Post a Comment