CSS tip: Remove the dotted line for links

Pablo Villalba September 21 2009

Padded links are a great idea, as they make links easier to click. Navigation bars and important actions in your page can be greatly improved with some padding.

But then you get this ugly outline when you click the link, which stays there until the next page is loaded. Luckily, CSS has the answer for this!

Just add a outline: none to any links where you want to avoid the dreaded dotted line.

But beware: If you disable outline for focused links, accessibility for users without a mouse will suffer, as they won’t see the active link when hitting tab.

Screenshot from the upcoming Teambox 2.0

Read also

blog comments powered by Disqus

Latest Posts