As you can see
I want to somehow remove the dotted lines after the button has been clicke
use the below code
a:active
{
outline: none;
}
try for other browsers also
a:focus
{
-moz-outline-style: none;
}
a:focus { outline:none }
Despite my comment on your question,
You should keep them for accessibility.
You can find your CSS-trick here for this
(Anyway, you should keep them.)
Possible with pure HTML as well:
<a href="..." hidefocus="hidefocus">...</a>
And with JavaScript you can do that on all links:
window.onload = function WindowLoad(evt) {
//hide focus:
var arrLinks = document.getElementsByTagName("a");
for (var i = 0; i < arrLinks.length; i++) {
arrLinks[i].hideFocus = "true";
}
You have to style the <a>
like:
a {outline: none}
If you want to keep the outline on active and on focus, but hide it on clicking a link, you can add in css:
A.No-Outline {outline-style:none;}
and use script:
$('A').hover(function() {
$(this).addClass('No-Outline');
},function() {
$(this).removeClass('No-Outline');
});
you must be hover befor clicking, so it does the job.
#myElement { outline: 0; }
Try this on your element, i dont now if is an image, div, button, link. But it works