开发者

Css active isse:not working

How to make css active color be greeen when the hyperlink is clicked.

i tried the below code but it does work

Note that LeftNavBG_2 is a green image

a:active.leftMenu { /* Left Menu */
 font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
 font-size: 14px;
 c开发者_如何学编程olor: #000;
 text-decoration: none;
 width: 144px;
 margin-bottom: 5px;
 display: block;
 max-width: 144px !important;
 vertical-align: bottom;
 padding-top: 5px;
 padding-bottom: 5px;
 background-image: url(../images/LeftNavBG_2.gif);

}


You should indicate your class before the pseudo-selector. Try a.leftMenu:active rather than a:active.leftMenu.


Make it green when the user clicks the link (mouse down):

a.leftMenu:active, a.leftMenu:focus
{
   /*your css here*/
}

Make it green when the user visited, clicked, the link:

a.leftMenu:visited
{
   /*your css here*/
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜