Thursday, August 18, 2011

How to remove button's/link's dotted line on focus in firefox?

Links
a:focus{
    outline: none;
    -moz-outline-style: none;
}

/*for firefox:
    vendor specific selectors don't work with comma(,) separated class names
    we can not keep all three selectors in one line -
    .button::-moz-focus-inner, a:focus, input[type="submit"]:focus, input[type="button"]:focus
*/
.button::-moz-focus-inner{
  border: 0;
}

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