Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Canada
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Why doesn't a:hover work with images?

    <style>
    <!-- a:hover {color: #FFFFFF;} -->
    </style>

    Why doesn't this work on links which are images with borders?

    Or does it work and I'm not doing it right?
    Tombo out.

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is rather a css question.

    Anyway, you can try with

    a:hover img {border: #FFFFFF ....}
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #3
    New Coder
    Join Date
    Jun 2002
    Location
    the windy city
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Tombo,
    in the piece of code you had shown us, what you are trying to do is color your whole image white, but javascript cannot do that.
    your code would have worked, if your link was text. then, the text would have become white.
    Borgtex gave you a good suggestion to try.
    Goals are dreams with deadlines
    -------------------------------------
    Nimlok Trade Show Display Booth and Exhibit
    http://www.orbusinc.com

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    valeria_vi,
    Acutally, this method DOES work, just not in IE. Try it in Mozilla or a new version of Netscape.

    Borgtex's suggestion will accomplish this in IE, however.

    a:hover img {
    border: 2px solid #FFF;
    }
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #5
    New Coder
    Join Date
    Jun 2002
    Location
    the windy city
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by beetle
    valeria_vi,
    Acutally, this method DOES work, just not in IE. Try it in Mozilla or a new version of Netscape.
    good to know, beetle, although it does not seem logical from looking @ the code. i mean, whenyou don't specify what it is you want colored ...

    Originally posted by beetle
    Borgtex's suggestion will accomplish this in IE, however.
    a:hover img {
    border: 2px solid #FFF;
    }
    will the same work for mozilla and new ns, then, as well?
    Goals are dreams with deadlines
    -------------------------------------
    Nimlok Trade Show Display Booth and Exhibit
    http://www.orbusinc.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •