Log in

View Full Version : how to remove underline from link



olanexhari
02-11-2010, 05:28 PM
Hi,

I am quite puzzeled by this problem. I am using dreamweaver template for my website. In some of the pages I have link to another site with underline. now i want to remove this underline. i changed text decoration to none but still its not working. Anybody please help me here. could it be possible because I am adding link in editable region of template...

here is link to page...

http://www.reedhee.com/hindi%20mov%20qayamat%20se%20qayamat%20tak%20megavid%20pt-2.html

Thank you

auriaks
02-11-2010, 06:26 PM
You must type your script where the problem is. Sorry

bluewalrus
02-11-2010, 06:37 PM
Put at the end of your css. This will remove all underlines from links. You're specifying specific ones right via ID.


a {
text-decoration:none;
}

olanexhari
02-11-2010, 10:05 PM
Thanks Bluewalrus....

It worked like a charm...

just curious about one more thing. Although i dont want to use it right now, I just want to have knowledge of it...

Is there any way to remove underline from one particular link and not all the links of page???

Thanks...

Schmoopy
02-11-2010, 10:21 PM
Yes, like so:



<html>
<head>
<style>
a{
color:#333;
}

#external{
text-decoration:none;
}
</style>
</head>
<body>
Content...

<a href="page.html">Normal</a> <!-- This link will be underlined as usual -->

<a href="http://www.google.com" id="external">Google</a>
</body>
</html>


This will make all links a certain colour, but the element with the "external" id will be the only one that is not underlined.

You could also get multiple elements to not be underlined by using classes:



<head>
<style>
.links a{
text-decoration:none;
}
</style>
</head>

<body>
<div class="links">
<a href="bla.html">Bla</a>
</div>

Content...

<ul class="links">
<a href="link.html">Random</a>
</ul>
</body>


This will make any elements with the <a> tag inside any elements with the class "links" to not be underlined. You could be more specific and add:



<style>
div.links a{
text-decoration:none;
}
</style>


Which will make only elements inside a div and that have the class "links" to not be underlined.