Colour not changing in links
-
Hi,
Sometimes, when I change a word from my main colour (green) to the colour I use for links (red) and then I link it to something, it doesn’t work. It stays the same colour. In the edit page it looks blue and on the real page it looks green so you can’t see it is a link. Any idea why this is happening and how I can avoid it?
Thanks,
Lisa
http://www.drlisalaw.comThe blog I need help with is: (visible only to logged in users)
-
-
Are the links that don’t appear to change links you’ve clicked through already? That caught me once.
-
No : (
And now I have refreshed my cache and even more look green (albeit slightly lighter green) on explorer. Terrible situation as noone will know there are links there!
Extra bad on my blog page http://drlisalaw.com/blog/
Any ideas?? -
All of the links on your main blog page appear red to me. If this is completely bothering you, you could always make your links BOLD, which is what I do on my Monotone blog.
-
-
-
One set of span tags was out of place (the one for your phone #). This code is for red underlined links:
<a title="Map" href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=melchet+tel+aviv&sll=37.0625,-95.677068&sspn=31.095668,56.162109&ie=UTF8&ll=32.070502,34.775548&spn=0.016219,0.027423&z=15&iwloc=A" target="_blank"><span style="color:#8a3207;text-decoration:underline;"><strong>Tel Aviv clinic</strong></span> </a>. If you have any questions or you would like to arrange a time to talk to me in person at my private practice, please feel free to be in contact by calling me on 0526 281228 or by arranging an appointment <a title="Contact me" href="http://drlisalaw.com/appointments-contact-me/" target="_self"><span style="color:#8a3207;text-decoration:underline;"><strong>here</strong></span></a>.Your theme makes a dotted underline, but adding the text decoration adds a solid underline as well. Without CSS I don’t think you can over-ride the dotted line, so you will see this sort of double underline. But it is certainly more visable than the dashed line.
-
-
Oh, and you could make the font a little larger if you like. It might throw off the line spacing, but it would be subtle.
-
I am a little confused. I want to make it so that all links are permenantly this colour #8a3207 (not just when i click on them). Some are and some are not on my blog. Bold and underlined is not important – i was just looking for a solution to make them clearer.
I am able to do this from your code?
Thank you so much! -
-
Yes. But you have to add the code for each link.
(With CSS, I think you could make this happen automatically)The basic form is link, open in same or new page, span style defines color, tags for bold or italics, LINK_TEXT, close bold or italics, close span, close link.
<a href="LINK_URL_HERE" target="_self"><span style="color: #8a3207; text-decoration: underline;"><strong>LINK_TEXT_HERE</strong></span></a>The span definitions must be inside the link tags.
<a>……<span>XXX</span>…</a> -
You can set the link color (and bold or italic) in the Visual Editor, then use the link button to make your link. But the problem is that sometimes the “span tags” are out of place. I don’t know why that happens. It just does. Perhaps your cursor is slightly out of place, or you define the color after making the link…
So if you do it all in the visual editor, then go into html to make sure the span tags are in the right place.
(the XXX is supposed to represent your link text in the bottom code above)
-
span style defines color
Not really… you can change the color of a text with the span tag, but is not only used for that (at least that’s how I understand it from your post).
In this case, nesting a “span” tag inside an “a” tag is a little overkill.. the same goes for the “strong” tag. The whole effect can be achieve in one tag:
<a href="LINK_URL_HERE" style="color: #8a3207; font-weight: bold; text-decoration: underline;">LINK_TEXT_HERE</a>Also, notice that I took the ‘target=”_self”‘ property out. That’s the default behavior of a link.
HTH
-
@devblog
Thanks! Much more elegant. No span tags to get out of place!I’m a novice! My code was from what I learned from by using the Visual Editor, which uses the span tags. I believe the OP used the link button on the Visual Editor, which gives the option of “self” and on one link she had it open in a new window and in the other in the same window, so I just kept that from her code.
How would you style italics if you don’t use em?
-
Tess,
The editor can help you understand how to do things, and beginners can definitely learn by reading the source code…. That’s what teachers/experienced developers encourage beginners to do. That was (and still is) part of my learning process as well.
How would you style italics if you don’t use em?
Like this:
<span style="font-style:italic;">I'm in italics</span>so If you wanted to make a text link red, bold and in italics, the code would be:
<a href="URL" style="color: #f00; font-style: italic; font-weight: bold;">TEXT</a>Of course, there will be times when you want to set only one word of a link to red, then you’d use a span tag inside your a tag:
<a href="URL" style="font-style: italic; font-weight: bold;"><span style="color: #f00;">I'm red</span> TEXT</a>HTH
-
OK, so this wasn’t working:
If you would like to contact me directly click <span style="color:#8a3207;"><a title="Contact me" href="http://drlisalaw.com/appointments-contact-me/" target="_blank">here</a></span>. If you would like to be updated by e-mail when I post a new blog click <span style="color:#8a3207;"><a title="Subscribe" href="http://feedburner.google.com/fb/a/mailverify?uri=DrLisaLaw&loc=en_US" target="_blank">here</a></span>. For sharing options you can click on one of the icons below in each post.I need to change it to this?…
If you would like to contact me directly click <a href="Contact me" href="http://drlisalaw.com/appointments-contact-me/" target="_blank" style="color:#8a3207;">here</a>. If you would like to be updated by e-mail when I post a new blog click <a href="="Subscribe" href="http://feedburner.google.com/fb/a/mailverify?uri=DrLisaLaw&loc=en_US" target="_blank" style="color:#8a3207;">here</a>. For sharing options you can click on one of the icons below in each post.(an example of something that although rather messy is working…)
They provide varied and excellent services, including help with finding employment and managing beaurocracy.<span style="color:#8a3207;"> </span><span style="color:#8a3207;"><a title="Misrad HaKlita" href="http://www.moia.gov.il/Moia_en" target="_blank"><span style="color:#8a3207;">The Ministry of Absorption</span></a> <span style="color:#7D8B5A;">w</span><span style="color:#7D8B5A;"><span style="color:#7D8B5A;">ill</span> provide<span style="color:#7D8B5A;"> essential information and assistance to olim from any country as will <span style="color:#8a3207;"><a title="Sochnut" href="http://www.jewishagency.org/JewishAgency/English/Home" target="_blank"><span style="color:#8a3207;">The Jewish Agency</span></a></span></span></span></span>.Thank you so much
-
I need to change it to this?…
That’s what’s recommended. Give it a try.
Also, I would strongly recommend you two things:
a) Do not use “click here” for text links… To know more why, you can read why “click here” is bad linking practice.
b) Do not use ‘target=”_blank”‘ when linking to sites, especially if you’re linking to another page in your site/blog. Is of bad practice to “force” window behaviors on other people’s browsers. Just imagine if navigating your blog will mean I’ll have as many windows open as links I click? Not good.
Regarding your code that’s working, yes… it’s messy and you have lots of empty tags…
...employment and managing beaurocracy.<span style="color:#8a3207;"> </span>...Now, going back to the suggested code. Try this:
If you would like to contact me directly, use the <a href="Contact me" href="http://drlisalaw.com/appointments-contact-me/" style="color:#8a3207;">contact form</a>.If that doesn’t change the link color, then force it like this:
If you would like to contact me directly, use the <a href="Contact me" href="http://drlisalaw.com/appointments-contact-me/" style="color:#8a3207 !important;">contact form</a>.If that still doesn’t change it, then try going deeper in the DOM.
If you would like to contact me directly, use the <a href="Contact me" href="http://drlisalaw.com/appointments-contact-me/" ><span style="color:#8a3207;">contact form</span></a>.The difference between this code and the one didn’t work for you is that the “span” tags are inside the “a” tags. Your code didn’t work because the styling of the “a” tags override that of the “span” tags enveloping them.
HTH
- The topic ‘Colour not changing in links’ is closed to new replies.