Rob
Posted by Rob
Posted on 06-27-2008 under CSS/HTML Markup, Development

even Google has problems sometimes

Firefox 3 Phantom Red Dot Pixel solution

So there is this annoying little bug in Firefox 3 - basically, if you have an image link, you will get this extremely annoying red dot in the upper left corner of the image when you click on it.  This is because you don’t have all the possible ‘a’ states defined, and Firefox 3 appears to be stricter about that than other browsers.  Don’t feel bad - even Google didn’t do it right (see above - look at the blue arrow).  Here’s the fix.

In your main CSS file, add this line:

a:focus, a:hover, a:active { outline:none }

That’s it!  The red dot will go away.  If only all web development annoyances were this easy!

Socialize

6 comments so far.

Jones

Perfect, the problem is solved now…thanks!

Posted On Jul 08 2008, at 15:47
morphlex

Excellent! Thanks for the heads up!!

Posted On Sep 04 2008, at 12:19
Mr.G

Hello,

First time visitor here. Found this site running a Google search for “dot above links in Firefox 3″ because it happens on more than just image links as far as I can tell.

On one of my sites it happens on certain links that are just text, and the color appears to coincide with the text-color of the link. In my case the text is #ffcc00 and so is the dot. The dot is also centered above the link, presumably due to the text-align attribute being centered.

My main reason for the post though, is to comment on your fix. It works just fine of course, but can be a drawback when considering people with disabilities as they often use TAB to navigate. Using this CSS-fix will cause them to not be able to tell which link is currently focused.

Just a heads up, and unfortunately I don’t know of any other workarounds at this time.

Regards.

Posted On Sep 10 2008, at 00:21
Rob
Rob

Hey Mr.G,

Yeah, unfortunately you are correct. Such is the life of the web developer - it’s a big game of compromises.

Posted On Sep 10 2008, at 09:27
Marcus

I think I found a global solution. Create a CSS class like this:

a.ffx:focus, a.ffx:hover, a.ffx:active {
outline: none;
}

Then, every time you link an image, assign this class to the anchor around the image. When you link text, do not use this class.

This way you will get rid of the pixel above images and still have text links outlined when you tab around the page.

Cheers!

Marcus

Posted On Sep 17 2008, at 11:15
Rob
Rob

Hey Marcus,

Thanks for the post! This seems like a good solution to the accessibility problem (although applying a class to every image link could potentially be a bit of a pain….)

Posted On Sep 17 2008, at 11:18


Post your comments

Fill up the fields below. Email is required but won't be revealed to anyone. Some (simple) html is allowed. If you want to cite another comment use the "Quote" link located beside each author. Finally be nice or at least keep it polite. Thanks for posting.