Jump to content

How to style anchor selectors


newcoder1010

Recommended Posts

Hello,

I have the following css for anchor selectors. Everything works except for the visited links. When a visitor already on a page(i.e. news page), I like the "news" link to be colored yellow (visited anchor) which is not working.  Please advise. 


/* unvisited link */
 .navbar-nav > li > a:link{
  color: white ; 
}

  .path-frontpage .navbar-nav > li > a:link{
  color: #24678d ; 
}

/* visited link */
 .navbar-nav > li > a:visited,
  .path-frontpage .navbar-nav > li > a:visited{
  color: yellow ; border: 1px solid #24678d; padding: 5px 15px 5px 15px;
}

/* mouse over link */
 .navbar-nav > li > a:hover,
  .path-frontpage .navbar-nav > li > a:hover{
  color: red; background:white; 
}

/* selected link */
 .navbar-nav > li > a:active,
 .path-frontpage .navbar-nav > li > a:active{
  color: green ;
}

 

Link to comment
Share on other sites

your css code is right not have any propary-value are wrong i think your are given some html propary in html tag so output not reflect.

    you have to put your html code so i will solve it. i have try to it it also work it. follow to try.html

 

try.html

Edited by Makwana Prahlad
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...