CameronSaliba
CameronSaliba

Reputation:

asp Image button dotted border

How can I remove the dotted border around an asp: Image button. The dotted border shows when I click on the image button. Thanks

Upvotes: 1

Views: 2622

Answers (5)

larry
larry

Reputation: 11

Try this CSS:

input:focus{outline:none;}

Upvotes: 1

raj
raj

Reputation:

sound. onfocus="this.blur();" does the trick.

Upvotes: 0

Matthew Olenik
Matthew Olenik

Reputation: 3577

That's the focusing border added by the browser. For usability purposes, it's usually a bad idea to remove it unless you are doing something specific. It's very difficult to select controls using the keyboard without it.

If for some reason you REALLY need to remove it, I believe the other answers here may provide you with a solution. But as someone often concerned with usability, I would advise you to reconsider.

Upvotes: 3

Quintin Robinson
Quintin Robinson

Reputation: 82335

Adding the following attribute/value to the imagebutton should produce the result you are looking for.

OnClientClick="this.blur();"

Upvotes: 1

x-way
x-way

Reputation: 896

It looks like you are talking about the focusing border added by the browser. There's a trick to do this with Javascript. Add the following to your image tag:

onfocus="this.blur();"

Upvotes: 2

Related Questions