How to Remove Outlines from Hyperlinked Images Using CSS?

Barbara Streisand
Release: 2024-11-18 10:09:02
Original
285 people have browsed it

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;
}
Copy after login

Remove Outline from Image Link:

a img {
  outline: none;
}
Copy after login

Remove Border from Image Link:

img {
  border: 0;
}
Copy after login

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!

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