The Divi BodyCommerce Gallery can sometimes take up excessive vertical space before fully loading, especially on slower sites. This behavior may trigger Cumulative Layout Shift (CLS) issues and negatively impact your site’s performance score.
To prevent this, you can use the CSS snippet below to restrict the overall gallery height before images are loaded. However, once the images load, they may still overflow the container. To fully resolve the issue, we recommend combining this snippet with this one, which limits the height of individual gallery images. . Once you restrict the image height, measure the total gallery height and set that in this CSS snippet.