-2

How can I make the image change if the other image is

    <div class="col-md-3">
     <a href="klanten/detail/19/de-bibliotheek-zuid-kennemerland.html">
        <img src="cms_img/logo_zuidkennemerland7.png" alt="" />
        <img class="hover" src="cms_img/logo_zuidkennemerland72.png" alt="" />
     </a>       
    </div>
Alyssa Reyes
  • 2,389
  • 6
  • 27
  • 52

1 Answers1

1

"hover" isn't a class. It's a psuedo-class. You need to create a div with the appropriate size and using CSS, give it one image as the background, and then the ":hover" class gives it the other image.

<style>

#mything {
 background-image: url(cms_img/logo_zuidkennemerland7.png);
}


#mything:hover {
 background-image: url(cms_img/logo_zuidkennemerland72.png);
}
</style>
Michael Lorton
  • 43,060
  • 26
  • 103
  • 144