how to prevent a background hover for img tags?

Discussion in 'CSS' started by driven, Mar 10, 2007.

  1. #1
    I have a .png file and in IE6, when I mouse over it, I get a background color hover effect. I don't want this at all, but how do I achieve no background color hovering?

    I tried,
    a img { background color: none}
    Code (markup):
    but that doesn't seem to work.

    i also tried
    img a {background color: none}
    Code (markup):
    but that doesn't work either. i'm sure it must be very simple when someone points it out to me :(
     
    driven, Mar 10, 2007 IP
  2. abdussamad

    abdussamad Active Member

    Messages:
    543
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Use background-color:none . Add a hyphen in the middle
     
    abdussamad, Mar 10, 2007 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    You can save yourself a lot of grief if you'll use the w3 validation services in the same way the dead in Chicago vote: early and often. :)

    When I forced your error, I got this result:
    
    URI : file://localhost/webdeveloper_koko_1173594462239.css
    33 	li 	Value Error : background Parse Error - color: none
    Code (markup):
    cheers,

    gary
     
    kk5st, Mar 10, 2007 IP
  4. driven

    driven Well-Known Member

    Messages:
    400
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    138
    #4
    actually guys, I do have the hyphen. Sorry, I forgot to include that here, but it is in my code but still doesn't work right.

    i did insert the white as the background color and i still i get a background color in IE6 and IE7.
     
    driven, Mar 11, 2007 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    In that case, you haven't provided enough information for us to debug. Give us a link to the page, or create a minimal test case and post the code.

    I should add that IE6 does not have support for png images. It renders them but not well, and if there is an alpha channel, well, all bets are off. Try a jpg or gif in its place, as a test.

    cheers,

    gary
     
    kk5st, Mar 11, 2007 IP