pagallery Posted July 13, 2007 Share Posted July 13, 2007 I want to use an image as a link to another web page but I don't want the blue 'link' border round it. I've tried putting border="0px" but this does not get rid of the blue border.What code should I be using either in my html or css? Link to comment Share on other sites More sharing options...
zppblood Posted July 13, 2007 Share Posted July 13, 2007 HTML<img src="myimg.jpg" border="0">CSS<style type="text/css"> .link { border: 0; }</style><a href="page.html"><img class="link" src="myimg.jpg"></a> Link to comment Share on other sites More sharing options...
ste Posted July 16, 2007 Share Posted July 16, 2007 you dont have to give each image a class, you can just apply border:0; to all images in the css file like thisimg {border:0;} Link to comment Share on other sites More sharing options...
vchris Posted July 16, 2007 Share Posted July 16, 2007 you dont have to give each image a class, you can just apply border:0; to all images in the css file like thisimg {border:0;}That's what I do since in most cases I don't wanna image borders. This way the code is even cleaner. Then if you really need a border on a certain image, simply create a class that will add a border to your image. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.