Getting rid of border image

How do I get rid of the border around the UK flag on this page…?



Barnum,No one will be able to see your code as you have provided a linking to a file directly on your machine ( and not on the internet) :confused:

Chances are you have an anchor (link) tag around your image, many browsers’ default setting put a border around image links. You can reset this by putting the following declaration in your CSS file: a img {border:none;}

Hope that helps.

This appears to be the page online:

The border is being applied by this in the embedded style sheet:

img {
   border: 4px solid black;
   margin: 10px;
   padding: 0px;

If you need to apply one-off styling either to a single element or similar elements that may occur throughout your site (such as flag images) then you could create a new class with an appropriate name e.g.

.flag-pic {
    border: none;

And add the class to the img element:

<img class="flag-pic" src="images/UKflag.gif" width="200" Height="100">

Alternatively, if it’s likely that borders will need to be overridden on a range of different elements, you could use a class name that reflects this single purpose e.g. .no-border

Thank you…did the latter and it worked. Appreciate your help.

many browsers’ default setting put a border around image links.

I’m still looking for this elusive browser. Many put borders around all images, but I haven’t found one who cared about links yet. Instead, the img border just gets turned blue instead of black or whatever.

img {
border: 0;
ought to remove the borders from all images in all non-neolithic browsers (but if there is a neolithic browser who only goes after a img’s, I want to find it. You know, hunt it down, kill the last of its kind, skin it and hang its head proudly above my mantel. Then I can gaze at it smugly while reclining in my smoking jacket in my eared highback chair made from the bones of my enemies, and puff on my Cuban cigar while sipping brandy)


I’m still looking for this elusive browser.

FF on mac, but… I like FF and I love macs so.

Now that I can see Barnum’s code – :frowning: — I realize that the best way is to assign a class or ID since he’s overriding a set style for all images anyway.
[ACTUALLY I would recode the whole page and since the image would probably be the only image in the masthead use .masthead img. Just a tip :wink: ]

FF on mac sets no default border on img but does set a border on a img?

Okay, readying my shotgun and horses and the hounds…