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

User Help for Mozilla Firefox
Locked
jason_in_oregon
Guest

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

Post by jason_in_oregon »

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 by Unarmed »

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

Post by Guest »

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

Post by Guest »

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 by Guest »

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 by Guest »

Sweet! Thanks again!!!
Locked