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

Divi Form Builder

Divi Form Builder

From simple contact forms to complex frontend post or product creation, Divi Form Builder has you covered.

Divi Form Builder
Find out more
Divi Machine

Divi Machine

Build complex websites that displays dynamic fields you can filter, search and so much more with the Divi Builder.      

Divi Machine
Find out more
Divi BodyCommerce

Divi BodyCommerce

A versatile toolkit for developers using Divi and WooCommerce together, designed to boost your e-commerce site and achieve greater conversion rates.    

Divi BodyCommerce
Find out more
Divi Handoff

Divi Handoff

Let clients update content without touching the Divi Builder. Design layouts once, connect them to Flexible Content fields, and give editors simple forms for text, images, and sections.

Divi Handoff
Find out more
Divi Loop Extender

Divi Loop Extender

Unlock the Full Power of Divi 5 Loop Builder Add advanced sorting, filtering, and relationship logic right inside the Visual Builder.

Divi Loop Extender
Find out more
Divi Membership

Divi Membership

Monetize your Divi websites by transforming them into membership sites with seamless subscription management, user-friendly interfaces, and customizable membership tiers.

Divi Membership
Find out more
Divi Machine Accounts

Divi Machine Accounts

Build an account area for your customers to edit their details, access wishlist, submitted posts and more. *Note: Requires Divi Machine installed and active

Divi Machine Accounts
Find out more
Divi Ajax Filter

Divi Ajax Filter

Filter WooCommerce, Posts & Custom Posts without reloading the page.    

Divi Ajax Filter
Find out more
Divi Mobile

Divi Mobile

Divi Mobile helps you create beautiful looking mobile menus without having to code.

Divi Mobile
Find out more
Divi Nitro

Divi Nitro

Give your Divi website that extra boost of speed with our Divi Nitro plugin to enhance your customer's experience.

Divi Nitro
Find out more
Divi Protect

Divi Protect

Password protect the content of your Divi website with our Divi Protect plugin. Keep unwanted eyes out!

Divi Protect
Find out more
Divi Mega Menu

Divi Mega Menu

Create stunning, responsive, and content-rich mega menus using the Divi Builder you already know. No coding required.  

Divi Mega Menu
Find out more