Click to See Complete Forum and Search --> : removing borders around links -onFocus statement
qwakkers
07-02-2003, 09:19 AM
Hi
Is there a way of using the onFocus statement (or any other) to apply it to links on the whole page, rather than writing it separately for each link?
I've attached an image to illustrate my query.
Any help would be appreciated.
Khalid Ali
07-02-2003, 09:23 AM
<style type="text/stylesheet">
a:hover{
text-decoration:none;
}
put the above snippet in your paes head section and it will remove the underline when mouse is brought over any links.
qwakkers
07-02-2003, 09:31 AM
Thank you - that was quick!
Will it work for when the mouse button is clicked rather than hover (sorry I didn't make that clear)
David Harrison
07-02-2003, 03:46 PM
No, to remove the border when the link is being clicked you should use
a:active, a:focus{...}
and if you like you could slip the a:hover in at the beginning as well.
Edit: You may not want to use a:focus, because that will remove the border when the link is activated by the keyboard and I sometimes find it easier to use the keyboard to navigate. If I came accross your page I wouldn't be able to tell which link I currently had selected. Just my preference.
qwakkers
07-03-2003, 06:43 AM
Thanks very muchly!
qwakkers
07-03-2003, 11:12 AM
I've tried both suggestions but they don't work. I may not be explaning it very well...
It isn't the actual rollover or underline that I'm trying to remove, it is the horrible blue box that appears when either a text or image link is clicked in Internet Explorer. I may be asking for the impossible???