Jump to content
Sign in to follow this  
newcoder1010

How to style anchor selectors

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 ;
}

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...