Site logo

Archived topic

Gap at bottom of Image Block

3 replies · Started by troyw on October 25, 2021

Viewing posts 1–4 of 4

Hey team,
I am using a Column Block with images and have a added a box shadow to the Image. However, since adding the CSS, the image has an annoying gap at the bottom which I can't seem to get rid of. If I change the image sizing, the images blow out of proportion.
The images are at the top of the home page for 'Filtration' and 'Pumps'.
Here is my CSS;

/* All Box Shadows */
.box-shadows {
  position: relative;
  display: inline-block
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  -webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.box-shadows::after {
  content: "";
  border-radius: 5px;
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  opacity: 0;
  -webkit-transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.box-shadows:hover {
  -webkit-transform: scale(0.50, 0.50);
  transform: scale(1.05, 1.05);
}

.box-shadows:hover::after {
    opacity: 1;
}

Thanks

Hi there,

Try add this CSS:

.box-shadows {
    line-height: 0;
}

Let me know :)

Thanks Ying, worked great.

You are welcome :)

This archived topic is closed to new replies.