I'm using anchor tag as a menu item in my web page. I used css for designing anchor tag like a menu look. I have three anchor tag on my page.
my css design in as follows-
div.menu
{
margin:0px;
height:30px;
background-color:Gray;
}
span.menu a:link
{
display:inline-block;
font-weight:bold;
color:#0000CC;
background-color:#E8EEFD;
text-align:center;
padding:4px;
text-decoration:none;
width:70px;
padding:5px;
margin:0px;
}
span.menu a:visited
{
display:inline-block;
font-weight:bold;
color:#0000CC;
background-color:#D3D5EB;
text-align:center;
padding:4px;
text-decoration:none;
width:70px;
padding:5px;
margin:0px;
}
span.menu a:hover
{
background-color:#D3D5EB;
}
above is my css design for anchor tag. I want to change the background color after clicking on the tag & color should stay up to the next selection of the menu item. I have tried throw above css. but it shows me the same background color after setting :visited style too.
When i run my page that time it is initially showing me the visited color & not the link color.
How to solve this?
thanks.