Vishwanath Dalvi
Vishwanath Dalvi

Reputation: 36681

how to hide HTML button selection?

alt text

I want to hide HTML Button selection like in above image whenever i click on buttons from 1 to 25 Its shows that it is selected like now i hv clicked on 10 its shows dotted border when i click on 10 no button .. I want to hide this for security purpose how can i do this any idea will help me

Upvotes: 7

Views: 7217

Answers (6)

Vishwanath Dalvi
Vishwanath Dalvi

Reputation: 36681

/*for FireFox*/


 input[type="submit"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner 
{
 border : 0px; 
} 


/*for IE8 */ 

input[type="submit"]:focus, input[type="button"]:focus
{
 outline : none; 
}

Upvotes: 1

Coin_op
Coin_op

Reputation: 10728

It usually isn't a good idea to remove the line for accessibility reasons. But if you really want to, some CSS like the following should work:

outline : 0;
-moz-outline : 0;
border : 0

These should be set on the :active and :focus psuedo classes for the buttons

Upvotes: 8

Timo Huovinen
Timo Huovinen

Reputation: 55683

css: outline:0;

you are triggering :focus, or the :active pseudo state which has the default dotted outline.

Upvotes: 0

Abdelilah
Abdelilah

Reputation: 37

You can add a css rule, or add an inline style like:

<button style="outline:none">1</button>

Upvotes: 0

fcalderan
fcalderan

Reputation:

in css

outline : none;
-moz-outline : none;

applied to the button or button:focus

Upvotes: 2

Scott
Scott

Reputation: 3977

in the css set outline:none;

Upvotes: 0

Related Questions