CSS - Remove "highlight" from clicked objects?

Yohhan

Senior member
May 17, 2002
263
0
0
I have a couple buttons that I'm using on my site, which are being used as links (see code example below). When I click them, a dashed line appears, outlined the image. I'd like to remove this -- On click, I don't want this dashed outline to appear. Is there anyway to do this using style sheets?

The HTML looks something like this:

Code:
<a href="somelink"><img src="image.jpg"></a>
[\CODE]
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I doubt it could be done using style sheets. That line simply means that that element has focus, sort of like having the cursor in a text box. You could remove it using javascript sorta like so:

<a href="foo" onclick="this.blur()"><img....

I don't remember if that's actually correct syntax, but I think that's the idea.

Edit: maybe I've misinterpreted the question. Have you set anything regarding the image border to 0 in your style sheet?
 

Yohhan

Senior member
May 17, 2002
263
0
0
You had it right the first time -- The element is getting focus. Not a problem with borders. It only seems to happen in Firefox, not IE. I guess it's not a huge deal, but I'd like to eliminate it if possible.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
If it's a feature of the browser, then why not let the users determine whether or not they want it? I really hate websites that try and dictate exactly how I'm supposed to view them.