Malik Jee
Malik Jee

Reputation: 25

hyperlink inheriting color, how to overcome

I am editing style.css of wordpress

and i want to display a hyperlink with white color i-e

<a class="viewall" href="/">View All</a>

.viewall {
  color: #ffffff;
}

But its still showing hyperlink with black color, as it is inheriting from above css defined.. How to overcome this ?

Upvotes: 0

Views: 39

Answers (2)

MikeSmithDev
MikeSmithDev

Reputation: 15797

You need to include style for "visited" as well.

   a.viewall, a.viewall:visited {
     color: #ffffff;
   }

More Reading -- includes styling unvisited, visited, hover, and active links.

Upvotes: 2

SubRed
SubRed

Reputation: 3187

Try to add !important to your CSS style:

.viewall {
  color: #ffffff !important;
}

Upvotes: 0

Related Questions