code to remove underline

  • 1
  • Question
  • Updated 8 years ago
  • Answered
I don't manage to find in the forum the code to remove the underline of the link (which I use as a sub page).
I have tried many.
can I have a exemple that I can just copy and paste?
here is the one that I have so far which underlines my link:
sefaf.php

Photo of fiamma

fiamma

  • 41 Posts
  • 4 Reply Likes

Posted 8 years ago

  • 1
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
Hello do you want to remove the underline from ALL links on your page? Or just one? If you want to remove the underline of all, just drag over an HTML widget to your page and paste this in:

<style type="text/css">

a {
text-decoration:none;
}

.Apple-style-span a {
text-decoration:none;
}

</style>

Then click OK and Save your page. Preview your page to see the results.

If this does not work let me know and I will give you another code to add.

I hope this helps.

Nathan
Photo of brianwkeith

brianwkeith

  • 4 Posts
  • 0 Reply Likes
Hello,

I have just tried this but my links are still underlined. Any other suggestions. I'm a silver user and have access to css.

Thanks!
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
Try putting this inside your custom CSS instead, it will work across the whole site so you don't have to add it manually to each page. It can be found in Style > Edit Custom CSS.

a {
text-decoration: none !important;
}
Photo of brianwkeith

brianwkeith

  • 4 Posts
  • 0 Reply Likes
Great, it works! Thanks!
Photo of fiamma

fiamma

  • 41 Posts
  • 4 Reply Likes
thanks for your quick reply.
I have tried what you said but no luck.
I have a page in which I want to add sub pages.
so I drag a text widget then I go to link and look for the pages which I have put out of navigation.
then it appeared underlined. I used to be able to change its code (by pasting one I found ages ago on the forum and that I can't find anymore) and it would remove the underline.
then I could change its font and size normally without changing the code.
I have read everywhere to add
"text-decoration:none"
but I don't know where in the code I have to insert it.
I don't know much about code so the simpler the better.
thanks
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
Hi, first, click on the text widget. Then in the text editing toolbar, click the last button which says "HTML" You will see a lot of code but don't worry. Find the text in the code which says your link. (Find the text that is a link in the text widget) Right before that text it says

<a href="page.php>

(Where page.php is the actual page you have it linked to)

Now, in that code, in the a tag, put in style="text-decoration:none;" so it would be like this:

<a href="page.php" style="text-decoration:none;">

So that code exactly before that text would have to have style="text-decoration:none;" If there is already a style="" in that a tag, then just add in text-decoration:none; in the style quotes.

This probably sounds a little confusing and if it does let me know.

I hope this helps.

Nathan
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Thank you Nathan.
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
Your welcome.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hello Fiamma

Please let us know if you have any further troubles with this.
Photo of fiamma

fiamma

  • 41 Posts
  • 4 Reply Likes
thanks for detailed step by step answer. It worked!
very helpful
Photo of Nazlie

Nazlie

  • 1721 Posts
  • 51 Reply Likes
Thanks for letting us know the steps worked for you!
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
No problem Fiamma! :)
Photo of Green Girl

Green Girl

  • 531 Posts
  • 12 Reply Likes
I used the Nathan's tip, and it works wonderfully.
Thanks alot Nathan :-)
But there is a little problem, it no more changes the cursor to a hand sign when mouse is hovered over the link. So it feels a bit weird :(
Can somebody please tell me how to get the 'hand-like-cursor' when moused over a link.
Thank you once again :-)
Photo of Green Girl

Green Girl

  • 531 Posts
  • 12 Reply Likes
@ Nathan Yes tried this, but didn't work :(
@ Boomer I m jumping in joy that atleast somebody here still remembers me! :)
Photo of diane

diane

  • 1238 Posts
  • 121 Reply Likes
Hi, Green Girl,

I am getting a hand over the links. Perhaps try clearing your browser's cache and see if that helps.
Photo of Green Girl

Green Girl

  • 531 Posts
  • 12 Reply Likes
@ Diane You might have checked my test site? I havent put the link of page i m testing this code on. But i will still confirm it after clearing my browser cache.
Photo of Nazlie

Nazlie

  • 1721 Posts
  • 51 Reply Likes
Hi Green Girl

The way the cursor is displayed to show a link, depends on the browser and version you are using. Which browser are you using to test your code? If you have recently changed your or upgraded your browser, it would explain why you are no longer seeing the hand cursor on your link. Take a look at this informative article about using the cursor code: Using Cursor Hand or Cursor Pointer.
Photo of Green Girl

Green Girl

  • 531 Posts
  • 12 Reply Likes
Hi Nazlie,
Thanks for the link, i will have a look at it and let you know if i could find a work around.
And i havent changed anything in my browser. And i m testing it in both chrome and firefox.
Photo of Francois

Francois, Employee

  • 282 Posts
  • 19 Reply Likes
Hi Green Girl,

Please do keep us posted. It would be great if we can make this work for you.