user5306470
user5306470

Reputation:

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>

Upvotes: 1

Views: 410

Answers (2)

Anake.me
Anake.me

Reputation: 467

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

Upvotes: 1

Leo L.
Leo L.

Reputation: 145

Try setting the position to absolute. And if that still doesn't work, go onto incognito mode and go on inspect element and check to see if the text box is overlapping.

If nothing still works, use inspect elements on Google and that should give you a great headstart. Good luck :D

Upvotes: 0

Related Questions