colecov
3/16/2019 - 2:02 AM

Make divi images all lanscape or portrait (uniform sixe)

/*  Best Code */

.et_pb_post img {
height:250px !important;
object-fit:cover !important;
}


/*  Alternate Code */
.landscape .et_pb_image_wrap {
 padding-top: 56.25%;
 display: block;
 }
 .portrait .et_pb_image_wrap {
 padding-top: 177.78%;
 display: block;
 }
.landscape .et_pb_image_wrap img,
.portrait .et_pb_image_wrap img {
 position: absolute;
 height: 100%;
 width: 100%;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 object-fit: cover;
 }
 
 (16:9 ratio)
 For gallery module:
 
 .et_pb_gallery_image.landscape {
padding-top: 56.25%;
display: block;
}

.et_pb_gallery_image.landscape img {
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
object-fit: cover;
}