Change default color for hyperlinks?
-
I want to change the default color for hyperlinks on my blog. There are two there now. Teal-ish ones I pulled over from another blog, and then new hyperlinks which follow this template’s CSS and those are like a sky blue. Gag. I tried to enter some code into the CSS as follows:
body {} which I’m not even sure that is the correct color, just a half-educated guess. But the code did not work, unsurprisingly. Please help, thanks!The blog I need help with is: (visible only to logged in users)
-
Howdy!
If you would like to change the color of all links on your blog, you can do so with the following CSS:
a { color: #fff; } a:hover, a:focus, a:active { color: #fff; }The first bit changes the default appearance of links. The second bit changes the color when you hover over, are currently on, or have previously visited a certain link.
However, on certain posts like “Business Blogs as Inbound Marketing Strategy: Why and How?”, you have specified the link color within the HTML styling of the link. For example:
My <a style="color: #0cab9b;" href="http://www.kmstrategiccontent.com/blog/thinking-critically-about-business-association-blogs-strategy-purpose" target="_blank">last post</a>The “style=”color: #0cab9b;”” overrides the CSS for the theme, so that particular link will not follow the CSS color. You’ll need to remove that bit from the link for it to work correctly. Does that make sense?
-
Hi Jeremey,
Thanks for getting back to me. So I inserted the code you suggested into the css, but I substituted the #fff with #0cab9b, I hope that is correct.
I get what you are saying about the html overriding the css at the post level, however I don’t understand why there are a few different things going on. Color 444444 is the correct color for my headers/body text. I want 0cab9b to be the color on all hyperlinks, so if I have that in the CSS and the html, it should be redundant, not cancel it out? Then I have some links now coming in as electric blue, which I think are from the links I added from auto-link suggester at the bottom of the editor. I think that this code [a class=”zem_slink” ] is bringing over that blue color? Should I just remove that code or what is the best way to address as that will be a recurring issue. Then some links show as purple but I think that is just on my personal screen as I’ve clicked through those links, and it should not show to other viewers. Does that sound right?
Thanks for your help!
-
Hi!
I inserted the code you suggested into the css, but I substituted the #fff with #0cab9b, I hope that is correct.
Yep! You would want to change out the fff (which is white) to the color you’re looking for. The hex code you mention corresponds with the following blue:
http://www.colorhexa.com/0cab9b
Let me know if that’s the color you’re looking for!
I don’t understand why there are a few different things going on. Color 444444 is the correct color for my headers/body text. I want 0cab9b to be the color on all hyperlinks, so if I have that in the CSS and the html, it should be redundant, not cancel it out?
You’re correct – if the elements are styled through HTML and CSS in the same fashion (with the same color), they will not cancel each other out. However, as you mention, it’s a bit redundant. The better solution would be to use CSS to style the bulk of your site and only use HTML styling in one-off cases. The main reason for this is that when you apply an overall CSS rule, you can style everything at once rather than having to go in and change every HTML instance.
It looks like all of your hyperlinks on the following post are the #0cab9b color:
Can you let me know if you’re seeing that on your side?
The body text looks like #444444 by default.
Then I have some links now coming in as electric blue, which I think are from the links I added from auto-link suggester at the bottom of the editor. I think that this code [a class=”zem_slink” ] is bringing over that blue color? Should I just remove that code or what is the best way to address as that will be a recurring issue.
Can you shoot over a link to a blog post where this is occurring? I apologize – I couldn’t track down a Zemanta link on your side. The solution you mention (removing the Zemanta class) sounds right, but I’d like to see it in action.
Then some links show as purple but I think that is just on my personal screen as I’ve clicked through those links, and it should not show to other viewers. Does that sound right?
You’re correct – that should just be your personal screen. However, you have a:visited set to the same #0cab9b color so it shouldn’t be showing up as purple. It doesn’t show up in purple on my side. Can you try another browser just to be sure?
- The topic ‘Change default color for hyperlinks?’ is closed to new replies.