Reputation: 1387
I'm slowly learning html/css. I have a client that wants 3 links on the page to be noticeable link colors (in this case, blue). However, when I try to edit the style of the links, only two of them are showing the changes.
I can't set it globally, or other links (such as some social media icons) are changing.
Here is what I've tried:
div.entry-content a:link {
color: blue;
}
entry-content a:link {
color: blue;
}
Here is what I'm looking at when I inspect the page:
So, where am I going wrong? I hope I added everything needed for assistance. Thanks.
Upvotes: 1
Views: 315
Reputation: 37
It seems you have clicked on the link earlier, so the link status is active or visited.
Try this, if ok then update your code with pseudo selectors :active
and :visited
:
a, a:link, a:visited, a:active {
color: blue;
}
Hope this help!
Upvotes: 1
Reputation: 2629
I'm assuming all three links are wrapped in in div with class entry-content. The only thing I can think of is that the first link is black or darker color because it's active or visited. You can style your links with just a
selector or with additional pseudo selectors.
/* Just a selector */
.entry-content a {
color: blue;
}
/* Just a selector */
.entry-content a,
.entry-content a:visited,
.entry-content a:active {
color: blue;
}
Upvotes: 3
Reputation: 48
Try adding a class name to the anchors, like so:
<a class="blue" href="url">link text</a>
and then in your css create the blue class .blue { color: blue; }
Upvotes: -1