AllDani.com AllDani.com - 20 days ago 6
CSS Question

CSS color not working on link

When visiting the page in Incognito (removing

:visited
styles) the link's text is blue, but it should be white.



.button {
color:#ffffff; /* white */
background:#d8eaf0;
}
.button:visited {
color:#ffffff; /* white */
background:#d8eaf0;
}
.button:hover {
color:#ffffff; /* white */
background:#3838a5;
}
.button:active {
color:#ffffff; /* white */
background:#d8eaf0;
}

<a href="example.com" style="text-decoration: none" class="button">text</a>




Answer

Where your ".button" CSS style is, change it to ".button:link".

Comments