How to Remove Outline Border on Link Click WordPress Website
Are you a WordPress website owner looking to enhance user experience and aesthetics? One often overlooked aspect is the outline border that appears around clickable links when they are clicked or focused. While this feature is essential for accessibility, it can sometimes detract from the overall design of your website. In this guide, we’ll walk you through how to remove the outline border on link click in your WordPress website, ensuring a cleaner and more polished look without sacrificing accessibility.
Understanding the Issue
By default, when a user clicks on a link or tabs to it using their keyboard, a border or outline appears around it. This provides visual feedback, especially for users navigating via keyboard or assistive technologies. However, this outline might not always align with your website’s design aesthetic, leading you to seek ways to remove it without compromising accessibility.
The Solution: Custom CSS
Fortunately, WordPress allows for easy customization through CSS (Cascading Style Sheets). By adding a simple code snippet to your website’s CSS file or customizer, you can override the default outline border behavior. Here’s the code you’ll need:
a:active, a:focus {
outline: 0 !important;
border: none !important;
-moz-outline-style: none !important;
}
Implementing the Solution, Follow step by step:
- Access Your WordPress Dashboard: Log in to your WordPress dashboard.
- Navigate to the Customizer: Go to “Appearance” > “Customize” from the left-hand menu.
- Access Additional CSS: Within the Customizer, look for the “Additional CSS” option. Click on it to open the CSS editor.
- Paste the Code: Copy the provided CSS code snippet and paste it into the editor.
- Preview and Publish: Preview your changes to ensure they look as expected. Once satisfied, click “Publish” to make the changes live on your website.
Youtube Video:
All is okay?
Share with us your feedback. Comment on this YouTube video, if you face any issues. Subscribe to our YouTube channel for more videos.
Thank you.