Remove the border on an image in a link in HTML / CSS

Last update on July 23, 2009 10:33 AM by jak58
Published by jak58
Remove the border on an image in a link in HTML/CSS




You made a clickable image by using the IMG tag within a <a href=""></a> link and the browser displays a frame or more precisely a border around the image.

There are two ways to delete the border:

HTML


Use the attribute BORDER = "0" in the tag <IMG>. For example:

<A HREF="jak58.html"><IMG SRC="pic1.gif" ALT="My picture." BORDER="0"></A>


CSS solution

In the stylesheet, define the code below:

a img
{
border: none;
}
Best answers for « Remove the border on an image in a link in HTML / CSS » in :
Remove the underline under the links in HTML/CSS Show Remove the underline under the links in HTML/CSS Using CSS Using CSS via a class Using CSS online AS you may have noticed, hyperlinks are underlined in HTML (by default) It is possible to remove the underline by using the CSS Using...
Managing images in HTML Show How do you display images on a web page? Having a few images on a website can make it more attractive and user-friendly. However, it is important not to go overboard, since images can take a long time to load, and in some cases can make a document...
Popup in CSS without Javascript Show Popup in CSS without Javascript Here's how to make a popup information in pure CSS, [no Javascript used]. Use :hover so as to use different CSS when moving the cursor. Among the modified CSS attributes, use display:none to...
How to easily display PHP/HTML codes in your webpages ShowHow to easily display PHP/HTML codes in your webpages Issue What code to use? Issue If you want your visitors to be able to see the source codes of your webpage, there is a very easy way to do so. Normally, all you have to do in a...
Reducing a Jpg image size ShowReducing a Jpg image size Step 1 (optional!): Skip GREYCstoration on the image Step 2: Reduce the resolution Step 3: Lower quality Step 4: Remove unnecessary information Conclusion If you find that your JPEG files are too large...
Outlook- No image display ShowOutlook- No image display Under Windows XP Service Pack 2, you can no more open attachment because of virus infection You can disable the feature by following below procedure: (Valid for Outlook Express) Go to Menu Tools and...
Download R-Drive Image ShowR-Drive Image creates disk image files for backup or for your CD / DVD. The image files can then be stored in the various removable media. The program is capable of restoring images on removable media or hard disk. Advantage R-Drive Image creates...
CSS - Style sheets ShowFont properties Property Value Description font-family Specific font (Arial, Times, Verdana) Familly (serif, sans-serif, fantasy, monospace, cursive) Defines one or more font names or font families. If multiple fonts are defined,...
Declaring a style sheet (CSS) ShowDeclaring a style sheet Style sheets are not directly integrated into the W3C's HTML recommendations. For this reason, you need to include elements in the HTML code indicating both the type of document, meaning the version of the HTML and CSS...