You are not logged in.

#1 2008-03-19 16:27:13

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

HTML question

I am using the following format for links on a web site I am working on...

<a href=http://google.com onFocus="if(this.blur)this.blur()">Google</a>

Rather than type that onFocus part into every link, is there a way I can put something in the header at the top that applies that to all links in the page? The command removes that little annoying selection rectangle on clicked links.

Offline

#2 2008-03-19 17:37:42

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: HTML question

Anything you put in the header will only run once (when the page loads), therefor it will not do what you want.

R.

Offline

#3 2008-03-19 17:59:15

tony5429
Member
Registered: 2006-03-28
Posts: 1,017

Re: HTML question

Actually, I have since decided against it due to accessibility issues for non-mouse systems.

Offline

#4 2008-03-20 01:45:01

ssjlegendx
Member
Registered: 2008-01-01
Posts: 94
Website

Re: HTML question

For the record, this goal can be accomplished with CSS:

:focus {
    outline: 0;
}

That code will actually "disable" the selection outline for all objects on the page (not just links).


#!/vim/rocks

Offline

Board footer

Powered by FluxBB