Posted By

1man on 07/08/06


Tagged

css styling links anchor


Versions (?)

Who likes this?

10 people have marked this snippet as a favorite

jkochis
Quinnin
tavo
mountchuck
fael
tedoe
asturi
amasters
roybatty
ClickyMouse


CSS Anchor Basic Styling (a:link, active, visited, hover)


 / Published in: CSS
 

Simple styling for the links on a webpage using CSS. Sometimes hard to remember what order the have to be in for the :hover to work correctly. (Now fixed :)

  1. body {
  2. margin: 0px;
  3. }
  4.  
  5. a:link {
  6. color:#000;
  7. font-size: 1.1em;
  8. font-weight:600;
  9. font-family: arial, helvetica, sans-serif;
  10. text-decoration: none;
  11. }
  12. a:visited {
  13. color:#000;
  14. font-size:1.1em;
  15. font-weight:600;
  16. font-family:arial, helvetica, sans-serif;
  17. text-decoration: none;
  18. }
  19. a:hover {
  20. color: #000;
  21. font-size:1.1em;
  22. font-weight:600;
  23. font-family:arial, helvetica, sans-serif;
  24. text-decoration: none;
  25. }
  26. a:active {
  27. color:#000;
  28. font-size:1.1em;
  29. font-weight:600;
  30. font-family:arial, helvetica, sans-serif;
  31. text-decoration: none;
  32. }
  33. a img {
  34. border: none;
  35. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: pagetoscreen on December 2, 2007

This code is wrong!

The order should be: a:link, a:visited, a:hover, a:active; I remeber by using these 2 words: LoVe HAte

You need to login to post a comment.