CSS link color not working

I am trying to change the link color of one of my tab buttons, but it doesn’t work. Its strange because all the other attributes in the same curly braces work fine, but the clor:#FFFAFA does not work. I set it against the background #778899 so that the previous snow-white color was visible.

Here is the code.

 a:link { color:#FFFAFA; text-decoration:none; background-color:#778899 } 

it is always purple and never changes

Here is the code where I implement it

  <dl class="profileTab"> <dd class="profileTabContents"><a href="edit.php">Personal Infomration</a></dd> <dd class="profileTabContents"><a href="education.php">Education, Employment & Activities</a></dd> <dd class="profileTabContents"><a href="sports.php">Sports & Athletics</a></dd> <dd class="profileTabContents"><a href="entertainment.php">Entertainment & Attractions</a></dd> <dd class="profileTabContents"><a href="philoSociety.php">Philosophy & Society</a></dd> </dl> 
+6
source share
4 answers

Well, this should work, but it is probably overwritten by your browser. Do it:

 a, a:link, a:visited { color: #FFFAFA; text-decoration: none; background-color: #778899; } 
+11
source

Perhaps this is due to visiting links.

http://www.w3schools.com/css/css_link.asp

 a:link {color:#FFFAFA;} /* unvisited link */ a:visited {color:#FFFAFA;} /* visited link */ a:hover {color:#FFFAFA;} /* mouse over link */ a:active {color:#FFFAFA;} /* selected link */ 
+8
source

Works for me - http://jsfiddle.net/ZS2Vn/

This color is too weak to notice a change on the white background of the page. Try setting a slightly darker foreground color.

color: #EFEAEA; or color: #DFDADA;

And, of course, like others, you must have pseudo-selectors for visiting, active, and guidance.

+2
source

This is due to the fact that the open link is saved in the browser. Delete your story or the links of your page with which you work in history will do your job. Give it a try. This is the solution.

+1
source

Source: https://habr.com/ru/post/896702/


All Articles