CSS Link Question

Hi can you please prodvide me with a fill example for this?

I have 3 classes (nav, footer, content)

I want all links to be same color with each class (active, hover, visited, link)

Nav = red
footer = blue
content = green

can you pleasee provide me with a full example?


Thanks
LVL 3
Computer GuyAsked:
Who is Participating?
 
khan_webguruCommented:
You can use like this

 
CSS

.nav:link, .nav:visited, .nav:active, .nav:hover {color:red;}
.footer:link, .footer:visited, .footer:active, .footer:hover {color:blue;}
.content:link, .content:visited, .content:active, .content:hover {color:green;}


HTML

<a class="nav" href="#">nav</a>
<a class="footer" href="#">footer</a>
<a class="content" href="#">content</a>

Open in new window



Best of luck for your project.

Thanks,
0
 
Gurvinder Pal SinghCommented:
A.nav:link, A.nav:visited, A.nav:active, A.nav:hover {color:red;}
A.footer:link, A.footer:visited, A.footer:active, A.footer:hover {color:blue;}
A.content:link, A.content:visited, A.content:active, A.content:hover {color:green;}


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.