Chris
Chris

Reputation: 1929

css border problem

For some reason I have a very ugly orange part of a border around a image.

Can anyone see why this is?

This is the HTML

<div class="preview">

            <a href="images/foto/full/280899624_6_5_j6.jpeg" title="Sportschool Raymond Snel" rel="lightbox"><img src="images/foto/full/280899624_6_5_j6.jpeg" alt="text" /></a>

</div>

This is the css

.preview {
    width: 85px; 
    height: 85px; 
    overflow: hidden;
    border: 3px solid #2e2a26;
    }

The color code = FF6a00 but appears only one time in the css file.

a {
    color: #ff6a00;
    text-decoration: none;
    border: 0px;
}

As you can see I already gave it a 0px, but for some reason the border is still there.

Upvotes: 0

Views: 773

Answers (7)

Jon
Jon

Reputation: 6036

Try this:

.preview a:link img, .preview a:active img, .preview a:hover img, .preview a:selected img, .preview a:visited img{border-style:none;}

Upvotes: 1

Pratik Talati
Pratik Talati

Reputation: 9

Just try and put border="0" inside img tag. Let me know if that helps.

Upvotes: 0

clinton3141
clinton3141

Reputation: 4841

The border is because the image is a link (think about how links are blue by default - the same applies to image links, they have a border by default).

This line will fix it

.preview a img {border: 0;}

Upvotes: 1

Nick Craver
Nick Craver

Reputation: 630349

Try this:

.preview a img { border: 0px; }

Upvotes: 1

Jamie Dixon
Jamie Dixon

Reputation: 53991

You'll want to remove the border on images instead of just on the anchor. The border is actually coming from images inside anchors so the following will fix it:

img{border:none;}

Upvotes: 1

Jeff Beck
Jeff Beck

Reputation: 3938

Try the following CSS it will make sure any image inside a link doesn't get a border.

a img { border:0px;}

Upvotes: 1

Xr.
Xr.

Reputation: 1410

Try img { border: 0; }

Upvotes: 3

Related Questions