I have a styled button on my website. But when I click it, it creates an unwanted border or outline (I don't know which). How can I remove that border? Below is all the code that pertains to the button.
button {
border: hidden;
cursor: pointer;
outline: none;
}
<button>this is my button</button>
Use either of these CSS Styles
OR
Once the CSS Style part is done, then you might also need to set the IE-Emulator. Update your web applications web.config file and include below key.
If you are talking about the dotted line in Firefox, I think what you're looking for is this:
This is a thread on the topic: How to remove Firefox's dotted outline on BUTTONS as well as links?
It's an outline. Use
outline:none;
on :focus pseudo-class to remove it. Worked well for me.This worked for me in Chrome.
Please don't remove the outlines on focus-styles, this makes your site less accessible to your keyboard-only and low-vision users.
If you choose to add something like
:focus { outline: none; }
to your stylesheets, also add you owns styles for focused elements.Reading: Never remove CSS outlines