CSS Tips: Remove that outline on CSS Sprites

0

One of the major techniques in CSS is the use of CSS sprites to replace list item link elements (such as RD’s menu above) with images.

However in Firefox, those link elements when clicked produce an ugly outline around the link element. This is also evident for embedded flash objects such as sIFR when selected.

It’s really simple to remove these, either apply the following code in your CSS file to all links, or apply to your specific set of CSS Sprites. All we’re doing is forcing no outline for these elements.


a, a:active, a:hover, a:visited{
outline:0;
}

To remove the outline from flash objects such as sIFR, use the following variation:


a, a:active, a:hover, a:visited, embed, object{
outline:0;
}

0 comments

Add your mark below