Home > Web Front-end > CSS Tutorial > Why Is My Link Still Underlined Despite Using `text-decoration: none;`?

Why Is My Link Still Underlined Despite Using `text-decoration: none;`?

Susan Sarandon
Release: 2024-12-19 19:25:11
Original
911 people have browsed it

Why Is My Link Still Underlined Despite Using `text-decoration: none;`?

How to Remove Blue Underline from a Link

Problem:

You have a link that shows up in white but frustratingly persists with a blue underline. Despite applying text-decoration: none;, even with the !important rule, the underline refuses to budge.

Solution:

Upon closer inspection, you've discovered that the text-decoration: none; rule is being applied incorrectly. You're applying it to a span element (.boxhead), but it should be applied directly to the anchor element (.boxhead a).

Revised Code:

By applying this correction, you'll successfully remove the blue underline from your link, allowing it to show up in white without any unwanted distractions.

The above is the detailed content of Why Is My Link Still Underlined Despite Using `text-decoration: none;`?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template