I have built a responsive website that I am trying to get the thumbnail images to enlarge when I rollover and no matter what I try nothing happens, I have tried several online solutions and they do nothing.
I decided my last question was stupid as it was obviously css you were telling me! That will teach me to reply in a hurry.
I have tried:-
.img-thumbnail:hover {
transform: scale(1.2);
}
and
.band-services .img-thumbnail:hover {
transform: scale(1.2);
}
in my css - unfortunately in both cases it has done nothing! I put this in my site specific css rather than bootstrap css where the img-thumbnail is located.
Please can you advise what I’m missing and why I cant see the wood for the trees.
Thanks for letting me know. I dont know what happened there! I have cleared all cache and I can see it working now. The only thing is it is only going up a minute amount in size. The thumbnail around 200px is created from a 700px image and I was wanting when you hovered over the 200 to go up to the around full size. How do I alter this?
To get the original size on hover, instead of transform you could try override the inherited max-width:100% . The max-width could be whatever covering the original size within a upper limit:
Anyway, the 100vw was only an example, maybe 80vw would suit better. The image will display in its own intrinsic size and ratio, only limited by the max-width.
Interesting thread @John_Betong, well worth reading.
Just a note that hover only really applies to those navigating with a mouse. The enlargement may not be accessible to those using a keyboard or touch-screen device.
For keyboards you can add a selector for focus wich should work as you have wrapped them in <a> tags.
For hover on touch-screen it can be more complex as different devices act differently, some will give hover or focus on touch, but not all do.