Home >Web Front-end >CSS Tutorial >How to Eliminate Outlines Around Hyperlink Images in CSS?

How to Eliminate Outlines Around Hyperlink Images in CSS?

Patricia Arquette
Patricia ArquetteOriginal
2024-11-19 16:49:03493browse

How to Eliminate Outlines Around Hyperlink Images in CSS?

Eliminating Outline Around Hyperlink Images

When utilizing CSS Text Replacement with negative text-indent, a dotted outline may appear around hyperlink images when clicked. This article presents effective solutions to resolve this issue.

To remove the outline, utilize the following code:

For Anchor Tags:

a {
  outline: none;
}

For Image Links:

a img {
  outline: none;
}

Alternatively, to remove the border from image links, use the following code:

img {
  border: 0;
}

These solutions effectively eliminate the unwanted outline, leaving you with clean and professional-looking hyperlink images.

The above is the detailed content of How to Eliminate Outlines Around Hyperlink Images in CSS?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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