MozillaZine

HTML tag style="text-decoration: none" doesn't wor

User Help for Mozilla Firefox
jason_in_oregon
Guest
 

Post Posted January 30th, 2005, 9:03 pm

I am designing a website and I'm used to using the standard <b>style="text-decoration: none"</b> tag to keep IE from making links underlined. Unfortunately, this doesn't work in Firefox.

Does anyone know of an alternate tag to keep links from being underlined? Seems like a simple fix, huh?

Thanks,

Jason
jason @ jasonandcodi.com

Unarmed
 
Posts: 4941
Joined: July 31st, 2003, 1:26 pm

Post Posted January 30th, 2005, 9:08 pm

It works for me. Which element are you putting the style attribute on, the anchor itself or some crazy span business?

Guest
Guest
 

Post Posted January 30th, 2005, 9:12 pm

<style type="text/css">
<!--
a:link {text-decoration: none}
a:visited {text-decoration: none}
a:hover {text-decoration: none}
-->
</style>

Guest
Guest
 

Post Posted January 31st, 2005, 9:45 am

I was using the crazy span business. <b>just tried the css version and it works perfectly</b> on one website. going to test it on another one now... thank you!

Guest
Guest
 

Post Posted January 31st, 2005, 10:14 am

You can add other properties to the styles like font-weight, font-family, background, and so on.

Assign class names to have different links do different things.

Maybe you want one group of links to be underlined on hover:
<style type="text/css">
<!--
a:link {text-decoration: none}
a:visited {text-decoration: none}
a:hover {text-decoration: none}
a:link.deco {text-decoration: none}
a:visited.deco {text-decoration: none}
a:hover.deco {text-decoration: underline}
-->
</style>

Add class="deco" to the <a> tag of the link you want to underline on hover:
Code: Select all
<a href="someurl" class="deco">Link Here</a>

You get the idea.

Guest
Guest
 

Post Posted January 31st, 2005, 10:32 am

Sweet! Thanks again!!!

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 22 guests