Limit the Divi BodyCommerce PP Gallery Module Height

Easy

CSS

BodyCommerce

Details

This Divi Code Snippet will allow you to limit the Divi BodyCommerce PP Gallery module’s height. You can either limit the height of every gallery on your BodyCommerce website, or apply the height limitation to specific galleries only.

The Sale badge might not look the best with this trick. So if you want to remove the badge from any gallery, just add this class to the advanced tab of that gallery module: remove-onsale-gallery.

Snippets Demo

Code

1

Description:
This will limit every PP Gallery module to a certain height.

Language: CSS

Where to add: Divi Theme Options

                        /* Limit height of bodycommerce gallery */
.et_pb_db_images img {
    max-height: 380px;          /* Change this value to your desirable maximum height */
    width: auto !important;
    margin: auto !important;
}

.et_pb_db_images .slick-list.draggable {
    max-height: 380px;          /* Change this value to your desirable maximum height */
}

/* Removes the sale badge from any gallery with the remove-onsale-gallery class */
.remove-onsale-gallery span.onsale {
    display: none;
}
                    
2

Description:
This will limit any PP Gallery module with the class "limit-bc-gallery-height" to a certain height.

Language: CSS

Where to add: Divi Theme Options

                        /* Limit height of bodycommerce gallery
This will limit any gallery height with the class limit-bc-gallery-height */
.limit-bc-gallery-height img {
    max-height: 380px;          /* Change this value to your desirable maximum height */
    width: auto !important;
    margin: auto !important;
}

.limit-bc-gallery-height .slick-list.draggable {
    max-height: 380px;          /* Change this value to your desirable maximum height */
}

/* Removes the sale badge from any gallery with the remove-onsale-gallery class */

.remove-onsale-gallery span.onsale {
    display: none;
}
                    

Related Snippets

Explore more from Divi Engine