...

View Full Version : remove underline from link



zodehala
11-01-2008, 08:43 PM
i have picture with link and i couldnot remove underline (or border) from it

my codes followings


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


<a href="http://www.goolge.com" title="google" target="_blank"><img src="images/ico.png" /></a>

brazenskies
11-01-2008, 08:46 PM
if you want to remove the b order from all linked images then add this to your styles...




img {border:0px;}


If you only want it from away from that image then use...



<img style="border:0px" src="images/ico.png" />

oesxyl
11-01-2008, 10:34 PM
if you want to remove the b order from all linked images then add this to your styles...




img {border:0px;}


If you only want it from away from that image then use...



<img style="border:0px" src="images/ico.png" />

0 have no units, :)
use border: 0; or border: none;
I don't know if is about underline because op text-decoration: none, already solve this problem so I guess is about outline:

http://www.htmldog.com/reference/cssproperties/outline/

probably outline-style: none; will solve the problem.

regards

Bill Posters
11-01-2008, 10:49 PM
0 have no units, :)
brazenskies' code was perfectly adequate.

For 0 values, units are optional. You can use them if you wish. They aren't going to do any harm and won't make any functional difference.


use border: 0; or border: none;
Heck, belt 'n' braces… border: 0 none; is perfectly valid. ;)


I don't know if is about underline because op text-decoration: none, already solve this problem so I guess is about outline:

http://www.htmldog.com/reference/cssproperties/outline/

probably outline-style: none; will solve the problem.
…and create another*.

Bear in mind that the outline is a property of the anchor, not the img within the anchor, so it would need to be applied to the anchor, were it wanted gone.
* Bear in mind the accessibility issus associated with removing the outline (and not replacing it with some other, effective means of denoting focus).

Fwiw, as you appear to like to drop optional bits, outline: none; should do the same job as outline-style: none;; ;)


As you most likely know, image links adopt a blue border which text-decoration: none; will not remove. It is most likely that blue border which the OP is speaking of.

As said, brazenskies' code will do the job.

oesxyl
11-01-2008, 11:02 PM
As you most likely know, image links adopt a blue border which text-decoration: none; will not remove. It is most likely that blue border which the OP is speaking of.

nobody contest brazenskies solution, read op and my post again.

regards

BabyJack
11-01-2008, 11:10 PM
Just to direct you into the right direction, and to conclude, you have an image with a purple border around it.
You need the border: none; code.

Bill Posters
11-02-2008, 09:56 AM
nobody contest brazenskies solution, read op and my post again.
Read it perfectly well the first time, ta.

Seems clear to me that you contested it on two points, his use of units (whereby you assert that 0 has no units [as opposed to pointing out that units are optional for 0 values], suggesting you felt there was something wrong with brazenskies post) and whether that was actually the solution or not, seemingly unaware that the text-decoration property of anchors translates into the border property with anchor images.

No biggie either way. Just a pedantic observation. ;)


Fwiw,…

a img { border: 0 none; }
…is the optimal solution, imo.

brazenskies
11-02-2008, 12:05 PM
wow, I think I'll just stick to the asp forum from now on!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum