Why does a:link a:visited selector override a:hover a:active selector in CSS?

Most of us who are either learning CSS or trying out his very first project could face this issue. To fix this issue make sure you have all the selectors in the right order. The correct order is:

  1. a:link {}
  2. a:visited {}
  3. a:hover {}
  4. a:active {}

If you change the order of any one like a:visited to last, it will override all the other selectors.

Published by AtulHost

Creator of AtulHost. An ardent Linux user. Comes from a business management background. Loves to do research on modern business insights and technological solutions.

Leave a reply

Required fields are asterisked and email address will not be shared.