We help IT Professionals succeed at work.

hyperlink

kvivekanand
kvivekanand asked
on
when a text is made a hyperlink,the text gets underlined.i DON'T want the underline for the hyperlink?how do i do it
Comment
Watch Question

Commented:
a:hover { text-decoration: underline; }
ahosangFinance Systems Developer

Commented:
<head>
<style>
.noline {text-decoration:none;}
</style>
</head>

<body>
<a href="www.yahoo.com" class="noline">Yahoo</a>
</body>

Works in IE 4+, NS 4+
brunobear probably misread it...and ahosang, there is no need for a class:

<style>
<!--
A { text-decoration: none; }
A:hover { text-decoration: none; }
//-->
</style>

And if you would like the link to get underlined only on mouseover:

<style>
<!--
A { text-decoration: none; }
A:hover { text-decoration: underline; }
//-->
</style>

That's all there is to it...
Max.

Commented:
http://david.us-lot.org/www-underline.php does a pretty good job of explaning a number of methods to do this.
Please remember though that a:hover is Internet Explorer only, the other parts work for both browsers...

Max.

Commented:
a:hover is not Internet Explorer only. It is supported by all Mozilla based browsers (including Netscape 6.x) and by all khtml based browsers (including Konqueror), as well as (I think) Opera.
Ok...ok...not just internet explorer....I stand corrected...but anyway...

Max.

Author

Commented:
Thanx for the quick response guys...
That's what we're here for kvivekanand, is there a reason for the Grade B?

Max.

Commented:
hmm...didn't misread, just forgot to change it after i copied and pasted....cause i really am THAT lazy... :-)
LOL...good quality for a programmer brunobear... :)

Max.

Author

Commented:
sorry dreammaster...i just didn't think twice when giving out the grade..no other reason
sorry again and hey..keep up the good work

ahosangFinance Systems Developer

Commented:
Just thought I'd give the class idea in case this rule was not to be applied to all links on the page :-)

Commented:
kvivekanand,

question about when you graded the Q....do you remember if the grade "B" was preselected?  of did you have to choose the grade you gave?

sorry just asking for bug testing...for some it seems to be one way, for others, the other...

thanks for your reply...
It's ok kvivekanand, I'm not upset or anything...just wondered...if you want it changed you can ask Community Support to do this....

Max.

Author

Commented:
It wasn't preselected..i remember clicking on it...

dreammaster,i'll mail community support..babye

Explore More ContentExplore courses, solutions, and other research materials related to this topic.