How to remove the outline from around a link

You might have noticed when your navigation items are block elements, an outline will appear when you click on them that can look out of place. This tutorial demonstrates how to remove the outline.

The outline in action

The fix

The fix is very simple and involves the CSS outline property. outline has several values, but the we are interested in is none - not hidden.

Example of setting outline to none

CSS Code:

        a {
        	outline:none;
        }
        

Result:

As you can see, no more outline. And it's as easy as that!

Drop me a line

Got any questions? Get in touch via the contact form or email me @ helen@alternategateways.com.

Related Tutorials

Latest Tutorials

View all tutorials

Share/Save
Visit Alternate Gateways on Facebook