OZONE Asylum
FAQ
How do I get rid of that rectangle when I click on a link?
This page's ID:
5031
Search
QuickChanges
Forums
FAQ
Archives
Register
You are editing "How do I get rid of that rectangle when I click on a link?"
Who can edit an FAQ?
Anyone registered may edit an FAQ.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
It can be annoying when IE leaves that rectangular highlight on your links, especially when they are graphics, but thanks to mr.maX there is a solution. Add this to the head: [code] <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"> <!-- ; // Written by mr.maX, http://www.maxworld.co.yu function removeFocus() { for (i = 0; i < document.links.length; i++) { document.links[i].onclick = document.links[i].blur; } } // --> </script> [/code] and change the body attributes: [code] <BODY ONLOAD="removeFocus()"> [/code] This will kill the rectangle when the page is loaded. There is another script that removes the rectangle when the focus falls on a link, but it causes problems for those who use TAB to navigate through a page and can cause problems with drop down menus (it is in the first link for those interested). This is a variation on the original script because it used [b]onfocus[/b] instead of [b]onclick[/b]. The disadvantage is that the rectangle will be visible between the time the mouse button goes down and comes back up, but the page will be navigatable with the keyboard. ----------------------- In Mozilla, this can be used in the CSS: [code]-moz-outline: none;[/code] Also, in IE you can use an expression like this: [code]a { selector-dummy: expression(this.hideFocus=true); }[/code] None of these proprietary CSS styles will validate, though. ----------------------- Relevant threads: [url=http://www.ozoneasylum.com/Archives/Archive-000003/HTML/20010305-2-000355.html]global script to kill link dots in IE[/url] [url=http://www.ozoneasylum.com/Archives/Archive-000003/HTML/20001015-2-000099.html]How do I make an anchor image not seem selected?[/url] [url=http://www.ozoneasylum.com/Archives/Archive-000003/HTML/20020526-2-000892.html]Getting rid of the......[/url] [url=http://www.ozoneasylum.com/Archives/Archive-000003/HTML/20020526-2-001427.html]ie onClick image highlight [/url] [url=http://www.ozoneasylum.com/Forum2/HTML/001840.html]No link selections in IE[/url] ______________________ [internallink=4626]Emperor[/internallink] [small][i](Added by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Emperor]Emperor [/url] on Sun 26-May-2002)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Slime]Slime [/url] on Sun 26-May-2002)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Emperor]Emperor [/url] on Sun 26-May-2002)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Tyberius+Prime]Tyberius Prime [/url] on Sun 26-May-2002)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Emperor]Emperor [/url] on Mon 28-Oct-2002)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=HZR]HZR [/url] on Wed 30-Oct-2002)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=Rinswind+2th]Rinswind 2th [/url] on Thu 08-May-2003)[/i][/small] [small][i](Edited by: [url=http://www.ozoneasylum.com/cgi-bin/ubbmisc.cgi?action=getbio&UserName=marty]marty [/url] on Sun 07-Sep-2003)[/i][/small] [small](Edited by [internallink=1695]kuckus[/internallink] on 09-07-2004 21:47)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »