I found a code that increases the size of the image when you hover it, and the hovered image doesn't get cropped by other images: TutorialRepublic.com
But when I also enter this code:
img { transition: filter .5s ease-in-out; -webkit-filter: grayscale(100%); filter: grayscale(100%); } img:hover { -webkit-filter: grayscale(0%); filter: grayscale(0%); }
When you hover the mouse, the images will become larger and will not turn gray, but the images will overlap each other. Is there a way to make it work without the images overlapping each other.
Add
position:relative
to the image and change thez-index
on hover so that the image overlaps the other images. Here is an example of using variables: