I created a carousel/slider of images with slick and now I want to increase the size of an image on hover.
When I try to do that the image is cut-off by the slick container. How can I bring the image to front so I can see the whole thing? I tried using z-index but it doesn't work.
JSFiddle of my code. Here's a screenshot with the problematic hover behaviour.
What I want:


Overflow being hidden is what's preventing the scaled image from showing entirely. But you can't simply show overflow as this will cause the hidden slides to show.
What you need to do is clone the scaled image outside of the carousel. Here is a working JSFiddle
With updated CSS
This will clone the hovered image, placing a scaled version on top and removing it when the mouse leaves it.