ugly img border...

liunx

Guest
Is there a way to chane the border color on a image when it has a link? When I make the image a link it has a very ugly blue border to it.<br />
<br />
<br />
thanks<!--content-->Try this: <img border="0" alt="some text" src=http://www.htmlforums.com/archive/index.php/"filename.jpg" width="100" height="100"><!--content-->Use the border="0" attribute in your img tag to get rid of it altogether.<br />
<br />
Otherwise you can use css to specify the color of your links and I think the border will take on that color.<br />
<br />
Put this between the head tags and set the colors to suit you:<br />
<br />
<style type="text/css"><br />
A:visited {color: #006699; text-decoration: none}<br />
A:link {color: #000000; text-decoration: none}<br />
A:hover {color: #00CCFF; text-decoration: none}<br />
A:active {color: #006699; text-decoration: none}<br />
</style><!--content-->Goldilocks:<br />
Otherwise you can use css to specify the color of your links and I think the border will take on that color.<br />
<br />
Thats right, The image border will take on the link settings colors when used as a link... jaeman<!--content-->I should have explained my self a bit better for the post, hahah. I meant I want a border with a black color. I have tried CSS and that doesnt work.<!--content-->Try this<br />
<style type="text/css"><!--<br />
img.black{ border:1px solid #000000; }<br />
--></style><br />
<br />
<img src=http://www.htmlforums.com/archive/index.php/"whatever.gif" alt="Description" class="black"><!--content-->ok, thanks I will try it and let you know.<!--content-->how about this? (it worked for me) ;) <br />
<br />
<style type="text/css"><br />
img { border-color : black; }<br />
</style><br />
<br />
Just put it in your <head>-tag.<!--content-->Maybe I should give you the entire code.. :rolleyes: <br />
<br />
This goes in the head-tag:<br />
<br />
<style type="text/css"><br />
img { border-color : black; }<br />
</style><br />
<br />
And where you want your image:<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"yourlink.html"><img src="yourimage.gif" border="1" alt="sometext"></a><br />
<br />
:)<!--content-->I know, I am not a HTML n00b. I must have just mistaked a line of code, but remember it does it only when there is a link on it, I know how to do border color on a img.<!--content-->
 
Back
Top