Malasorte
Malasorte

Reputation: 1173

Blue outline around active image

In Google Chrome, when I click on a linked image, the browser adds a blue outline around the image (please see the picture). How can I remove the outline? Tried this, no luck...

a img {
outline:none;
color:transparent;
}

blue outline around image

Upvotes: 0

Views: 1065

Answers (4)

Kheema Pandey
Kheema Pandey

Reputation: 10285

Lets try this method. check the DEMO.

a:focus{border: none; outline:none !important; }

Upvotes: 1

aBhijit
aBhijit

Reputation: 5391

Add this to your CSS:

a:active{
    user-select: none;
   -o-user-select:none;
   -moz-user-select: none;
   -khtml-user-select: none;
   -webkit-user-select: none;
}

Another option would be(probably the best one) not using img tag. Create a div instead and use CSS and use the image as that divs background-image.

Upvotes: 1

Husen
Husen

Reputation: 935

Make also outline none for a tag,

a { border:0px none; outline:0; }

Upvotes: 1

Andi
Andi

Reputation: 939

You need another selector:

a:active

Upvotes: 1

Related Questions