Forum Moderators: open

Message Too Old, No Replies

Focus box around text hyperlinks

         

Starks

10:18 pm on Dec 13, 2004 (gmt 0)

10+ Year Member



Please excuse, i'm a noob in the way of HTML.

Is there a way to completely remove those annoying tiny dotted boxes that appear around all text/image hyperlinks when you click on them?

tedster

11:06 pm on Dec 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<a href="whatever" onFocus="if(this.blur)this.blur()"></a>

This and many other handy Javascript snippets can be found here:

Handy, Generic Javascript Code [webmasterworld.com]

Starks

5:30 am on Dec 14, 2004 (gmt 0)

10+ Year Member



Thanks, that worked fine!

One other thing thats sort of related.....is it also possible to disable them in Windows XP operating system?

Orbite

1:28 am on Dec 16, 2004 (gmt 0)

10+ Year Member



A common question these days is "How do I disable the dotted box that appears around a clickable image in Microsoft Internet Explorer when it's selected?" Well, there's a "kludgy" way of disabling this, by putting in a JavaScript "onFocus" event that calls the "blur()" function to remove focus from the current object; but there are a lot of users who will be annoyed if you do this. The dotted box is an accessibility feature added by Microsoft to permit the browser to be used entirely from a keyboard without using the mouse. Some users prefer to surf this way, or have handicaps that make mouse-based navigation difficult or impossible. If you use JavaScript to defeat this feature, the users who want or need to navigate by keyboard will be compelled to disable JavaScript to use your site.

More about "How Do I Force...?" [webtips.dantobias.com] requests.

Starks

7:05 pm on Dec 16, 2004 (gmt 0)

10+ Year Member



Many thanks, I understand the reason for 'em now

icon_kid

5:57 am on Jan 1, 2005 (gmt 0)

10+ Year Member



Another way to illiminate the lined box around links, without Javascript, is to use the HTML "BORDER" property in the anchor. If you omit the Border property it defaults to 1 pixel. So, in the two anchors below, the first one draws a 1-pixel box around the link image. The second one specifies that the border has zero thickness and will therefor be invisible.

<A HREF=MyDocument.html><IMG SRC=linkImage.gif></A>
<A HREF=MyDocument.html><IMG SRC=linkImage.gif BORDER=0></A>