Click here to Skip to main content
Click here to Skip to main content
Alternative Tip/Trick

Tagged as

Remove blue border when image is inside the hyperlink

, 18 Aug 2011 CPOL
Rate this:
Please Sign up or sign in to vote.


Your way is for all images. If you want to remove border for selected images, then you can set the border style to inline for the particular image.


Method 1
<a href=""><img src="Bob.gif" alt="Codeproject" style="border-style: none;" /></a>
Method 2
<a href=""><img src="Bob.gif" alt="Codeproject" border="0" /></a>

Browser Compatibility

I have tested this script in the following Web browsers:
  • Internet Explorer
  • Mozilla Firefox
  • Google Chrome
  • Safari
  • Opera


<img src="" style="border-style: none;" title="Image without border">


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
India India
Programmer | Dude | ||||||
About him & his blog? check out here. Currently he's updating the site, he'll return soon there with more things*.
In Codeproject, he posted a blogpost & more than couple of Tip/Tricks, hope he'll write more soon.
Favorite techs are MVC, WCF, Mobile, HTML5, CSS3, jQuery, etc.,
His hobbies are watching movies, CP, being alone, etc., But now he's working on something*.
* - SCAMP???
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

Questionwhat about imagamaps? Pinmemberjan lucas5-Feb-14 6:54 
AnswerRe: what about imagamaps? Pinmvpthatraja5-Feb-14 16:39 
GeneralRe: what about imagamaps? Pinmemberjan lucas6-Feb-14 6:49 
GeneralMy vote of 5 PinmemberFarhan Ghumra28-Jun-12 2:35 
GeneralReason for my vote of 5 Good but it is always advisable to u... PinmvpKunal_Chowdhury5-Apr-11 19:39 
GeneralRe: Agree Kunal but it's just an alternate way, that's all. Pinmvpthatraja6-Apr-11 1:02 
GeneralRe: I think it's easier to illustrate it in a tip as an inline s... Pinmemberjlafay23-Aug-11 4:17 
GeneralReason for my vote of 5 Because it is simple and really work... Pinmemberkunal_shivalkar29-Mar-11 4:46 
GeneralReason for my vote of 2 inline styles are bad PinmemberSeishin#25-Mar-11 14:46 
GeneralRe: Well it's just an alternate way. Also it will effect for sel... Pinmvpthatraja25-Mar-11 16:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 18 Aug 2011
Article Copyright 2011 by thatraja
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid