Anchor Links Blue And Underlined

  • 1
  • Question
  • Updated 8 years ago
  • Answered
Hi
I have created two anchor links on this page http://www.leathersolutions.org/terms... to point to the two titles 'Awards' and 'Showroom Safety Regulations'

Both links work fine but as you can see the text is blue and underlined like a normal link, they should be black and not underlined.
Any thoughts?
Photo of David

David

  • 465 Posts
  • 94 Reply Likes

Posted 8 years ago

  • 1
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hello David,
Hyperlinks are underlined by default but there is a way to remove them. Here is a link to another thread on the forum with some code for removing the underline from the links on your page: Code to remove underline.

That thread details how to do this with CSS, here is another way to do it:

1. Click inside the Text Widget and click on the "HTML" button on the Text Editing Toolbar.
2. In the HTML Editor that opens, change the HTML to look like this:

<!--
<a href="http://www.domain.com" style="text-decoration: none;">Link text here</a>
-->

3. Click on "OK".

You may see the underline in the Sitebuilder but if you preview the page, it will not appear.

I hope this helps!

Emmy
Photo of David

David

  • 465 Posts
  • 94 Reply Likes
Hi Emmy
What a quick reply, as I understand it anchor links are not the same as hyperlinks and should not turn blue or underline according to the tutorial below

http://www.thesitewizard.com/html-tut...

Awards and Showroom are not linked with an 'href' to anything so shouldn't be affected should they? I tried 'text-decoration before I posted on the forum and unfortunately it didn't work.
Photo of Boomer

Boomer, Champion

  • 2055 Posts
  • 84 Reply Likes
You are correct, David. I see the problem!
Try this workaround.

From your page source (on the second anchor) I see this...
<font size="2"><a name="line1">Showroom Safety Regulations</a></font>

Try changing it to this...
<font size="2"><a name="line1"></a>Showroom Safety Regulations</font>
In other words, try placing the "link text" outside the <a> </a> tags.
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Boomer... thank you! So good to see you :)
Photo of David

David

  • 465 Posts
  • 94 Reply Likes
That's worked, thanks Boomer. I like to learn as I go, have you any idea why this didn't work using the standard format?
Photo of Boomer

Boomer, Champion

  • 2055 Posts
  • 84 Reply Likes
I'm glad that worked, David.

The stylesheet for your template is saying all <a> tags should perform as follows:

a{color:#3C7BCF;text-decoration:underline;}

Where (in my opinion) it should have been written as follows:

a:link{color:#3C7BCF;text-decoration:underline;}

This may be intentional or could be a typo.
Emmy may be able to ask one of the engineers to clarify this?