Jump to content

select all a:link , a:visited in some class


Nati323
 Share

Recommended Posts

hello , i have a <div> with class "nav" and i want that all the links inside will be design somehow.

so i did that:

.nav a:link , .nav a:visited  {	padding: 7px 20px; 	font-weight: bold;	font-size: 20px;	color: white;	text-decoration: none;}

but its not working, what have i done wrong?

Edited by Nati323
Link to comment
Share on other sites

Have you set the default styling for those links? as the styling above will only apply to unvisited and visited links, and the visited styling may not work as expected because some of styling has been disabled because of a security issue, where a users history can be tracked by this method.

 

default

.nav a {    padding: 7px 20px;    font-weight: bold;    font-size: 20px;color: red; /* for example purpose only, also underline is applied to anchor link by default*/}

 

you should only add the styling that will change

.nav a:link , .nav a:visited  {    color: white;    text-decoration: none; /* remove underline; */}
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
 Share

×
×
  • Create New...