How do you remove the dotted outline that appears on mouse click in Maxthon, IE7, and IE6?

The dotted outline that I want to remove appears on mouseclick when the page at is viewed  in Maxthon, IE7, and IE6.  The dotted outline is black.  It remains in place, highlighting the most recently selected item on the dropdown menu, until the viewer clicks the mouse elsewhere on the page.

I've tried using "hidefocus" toremove the dotted outline but found that the dropdown menu no longer functions properly when I add a "hidefocus" property.  A solution that involves simply adding the correct *css properties to the *css file would be great...  Thanks for your help!

asked Aug 2, 2011 by anonymous

2 Answers


<style type="text/css">
answered Aug 10, 2011 by anonymous
I've tried your suggestion but it doesn't seem work.  Thanks anyway --  Any other ideas?

I was able to solve this problem.

I used a slight variation on the code that Jeff Starr offered at the heading, “2. Advanced Method”

The method was provided earlier by Mike at

I pasted the following code into my *html file:

<script type="text/javascript">

var runOnLoad = new Array();

window.onload = function() {

            for(var i = 0; i < runOnLoad.length; i++) runOnLoad[i]()



for(var i in a = document.getElementsByTagName('a')) {

            a[i].onmousedown = function() {

                        this.blur();                 // most browsers

                        this.hideFocus = true;       // internet explorer

               = 'none'; // mozilla


            a[i].onmouseup = function() {

                        this.blur();                 // most browsers

                        this.hideFocus = false;      // internet explorer   

               = null;   // mozilla




My *html file calls images that need to swap with each onmouseover and onmouseout event.

The following line prevents the swap with each onmouseout event:

a[i].onmouseout = a[i].onmouseup = function() {

I replaced this line with the following line:

a[i].onmouseup = function() { 

So far, I haven’t noticed any problem resulting from this change, and the unwanted dotted outlines that were previously visible in Maxthon, IE7, and IE6 are now not visible.

Hope this info helps somebody out --

answered Aug 24, 2011 by anonymous
Web Analytics