• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

CSS - Remove "highlight" from clicked objects?

Yohhan

Senior member
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]
 
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?
 
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.
 
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.
 
Back
Top