Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7546759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:16:54+00:00 2026-05-30T09:16:54+00:00

When I mouse over linked images I see hover background color beneath the image.

  • 0

When I mouse over linked images I see hover background color beneath the image. How to avoid this?

Is there any solution that would not involve applying special class to a elements (like a.nobackground:hover)?

CSS:

a:hover, a:focus {
    background-color: rgb(240,39,96);
    cursor: pointer;    
}

HTML:

<a href="#" title=""><img src="with_transparency.png" alt=""/></a>

edit:
setting img background to none doesn’t work

a img {
    background: none !important;
}

setting img background to any other color would do the job if there’s no non-solid color (or graphic) beneath the image (in this case .png)

a img {
    background: #000 !important;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:16:56+00:00Added an answer on May 30, 2026 at 9:16 am

    Does setting the background color of the images do what you want?

    a img {
        background: none;
    }
    

    Depending on your stylesheets, you might need the !important bang in front of “none” to overwrite other conditions.

    Edit: On second thought, you might want to explicitly set a color value instead of simply saying “none.”

    Another edit: True, if the color or background behind the transparent PNG wasn’t a solid color, you’ll encounter some issues. One alternative is this:

    <a href="#" class="transparent_png"></a>
    

    And the CSS:

    .transparent_png {
        background-image: url('with_transparency.png');
        background-color: transparent;
        display: inline-block;
        width: ??px;
        height: ??px;
    }
    

    So here, you’re not actually using an image tag, but can overwrite the background-color property that’s normally applied on a:hover and a:active. Does this work?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to change the Hover (mouse over) color of a Windows application menu? Any
i have list of images and on mouse over there is option box shows
Im trying to get my images to animate on mouse over (hover) but for
I need some code to zoom an image when i mouse over that image,
I'm trying to show a zoomed in overlay on an image when mouse over
I have a table where i want to change cell background on mouse over
When I move the mouse over any of these two or right click any
I want that when mouse is over an image, an event should be triggered
I want that when mouse is over an image, an event should be triggered
How to highlight Article only on mouse over? current when i hover on Article

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.