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 3 of 3
  1. #1
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Image Hover Background Colour

    I want the background colour of the images to change as they are hovered over. It works in Firefox, but not IE, where IE is almost treating the :hover as :active.

    http://www.markaylward.co.uk/caleta/gallery.html

  • #2
    Regular Coder
    Join Date
    Apr 2004
    Location
    Birmingham, MI
    Posts
    131
    Thanks
    0
    Thanked 0 Times in 0 Posts
    What you want to do is set the background to the <A> not the <img>
    Code:
    .thumb {
    margin: 0;
    height: auto;
    float: left;
    text-align: center;
    }
    
    .thumb a {
    display:block;
    padding:5px;
    margin:5px;
    border: 1px solid #CCC;
    }
    
    .thumb img {
    border: 0;
    background: #FFF;
    }
    	
    .thumb a:hover { background: #EBD4B2; }

  • #3
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks.


  •  

    Posting Permissions

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