Home > Web Front-end > CSS Tutorial > How to Remove the Outline Around Hyperlinked Images?

How to Remove the Outline Around Hyperlinked Images?

Linda Hamilton
Release: 2024-11-19 17:47:02
Original
656 people have browsed it

How to Remove the Outline Around Hyperlinked Images?

Eliminating Hyperlink Image Outlines

When employing CSS Text Replacement with negative text-indent values (e.g., text-indent:-9999px), clicking on affected links reveals an unsightly dotted outline around the image. To address this issue, consider the following solutions:

  • Disable Outline for Anchor Tags:
a {
  outline: none;
}
Copy after login
  • Disable Outline for Image Links:
a img {
  outline: none;
}
Copy after login
  • Remove Border from Image Links:
img {
  border: 0;
}
Copy after login

These CSS declarations effectively remove the outline or border around hyperlink images, providing a more aesthetically pleasing user experience.

The above is the detailed content of How to Remove the Outline Around Hyperlinked Images?. 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