View Full Version : Image based a tags - removing a tag defaults

05-30-2007, 04:58 PM
Afternoon All

This seems like a really basic question, but I've checked books and web sites and haven't solved it for myself.

On the following page, all 3 'feature' images will have links attached to them. I've added a link to the 'balloon image' and now the image has a red border around it.


I've added border = 0 to nearly every class I could think of to try and remove the border, but it hasn't made a difference.

I also added a p tag and tried to format that, but it didn't work.

Would anyone know how to remove the border using css?

Thanks very much for any help


05-30-2007, 05:11 PM
To remove all borders from all images with links, use the following:

img {
border: 0px none;

Hope this helps.

05-30-2007, 05:23 PM
Thanks very much mate

Can i just ask, what is being declared as none?

05-30-2007, 05:41 PM
Good question, it's just one that I've used for a while that I was given, so the honest answer is... don't know. Colour? Thickness? Dunno. Soz man.

Have a good one.

Just taken a closer look at www.w3schools.com and seems like it might be border-style.


05-30-2007, 07:39 PM
Actually itís sufficient to set either border: 0; or border: none;. Border: 0px none; is a shortcut for border-width and border-style. Iím usually writing something like border: 1px solid red; which sets the thickness, the style (i.e. solid, dashed, dotted, double, whateverÖ) and the color. And border: 0 none; is just leaving the color out as itís useless to set a color to a non-existent border (as would be a border style actually). :)