How to remove Firefox's dotted outline on BUTTONS as well as links?
button::-moz-focus-inner {
border: 0;
}
Remove outline from button in firefox
In your case, you need to add background:transparent
to the button
element. Adding this, along side border:none
should solve the problem, if not, see this question.
Example Here
button {
background:transparent;
border:none;
outline:none;
}
Remove dotted line around clicked button
that's the focus. Among other things it is important for accessibility (it shows what element is currently selected/has been clicked), so actually you shouldn't remove it.
If you still want to remove it, add this to your stylesheet:
:focus {
outline: none !important;
}
How do I remove the dotted line on my image button when I click it in firefox?
Try this:
button::-moz-focus-inner {
border:0;
}
button
can be replaced with whatever selector for which you want to disable the behavior.
P.S: It also works without a selector by just using ::-moz-focus-inner
.
JSFiddle Demo
Can't get rid of dotted outline in Firefox links?
You need to apply the styles to the <a>
tag (your latter two CSS rules are wrong because you've put the <a>
tag inside <img>
.
This works for me:
a:active,
a:focus {
outline: none;
-moz-outline-style: none;
}
Or, for only inside the element with ID ul
(not the best name, by the way):
#ul a:active,
#ul a:focus {
outline: none;
-moz-outline-style: none;
}
CSS Firefox - How to deactivate the dotted border ( firefox click indicator )?
Provided that your menu items are not input elements (say, buttons), you can hide it using CSS, like so:
element { outline: none; }
Related Topics
Change a Html5 Input'S Placeholder Color With Css
Css Customized Scroll Bar in Div
How to Place Two Divs Next to Each Other
Floating Elements Within a Div, Floats Outside of Div. Why
How to Get Div Height to Auto-Adjust to Background Size
How to Center an Absolutely Positioned Element in a Div
Chrome/Safari Not Filling 100% Height of Flex Parent
How to Apply a CSS Filter to a Background Image
Difference Between Visibility:Hidden and Display:None
Does Height and Width Not Apply to Span
How to Apply a CSS Style on Html5 Datalist Options
Center a 'Div' Vertically in a % Height 'Div'
Disable Webkit'S Spin Buttons on Input Type="Number"
How to Make Fixed Header Table Inside Scrollable Div
Css: How to Say .Class:Last-Of-Type [Classes, Not Elements!]