Home >Web Front-end >CSS Tutorial >How to Remove Outlines from Hyperlinked Images Using CSS?

How to Remove Outlines from Hyperlinked Images Using CSS?

Barbara Streisand
Barbara StreisandOriginal
2024-11-18 10:09:02354browse

How to Remove Outlines from Hyperlinked Images Using CSS?

How to Eliminate Outline Surrounding Hyperlink Images

When employing CSS text replacement and applying negative text-indent, a dotted line may appear when clicking on hyperlinked images, as seen in the provided sample. To address this issue, consider the following solutions:

Remove Outline from Anchor Tag:

a {
  outline: none;
}

Remove Outline from Image Link:

a img {
  outline: none;
}

Remove Border from Image Link:

img {
  border: 0;
}

By applying these style rules, the outline and border surrounding hyperlink images can be effectively removed.

The above is the detailed content of How to Remove Outlines from Hyperlinked Images Using 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