Make Woo Products Module Items Equal Height

Written by Dan Mossop

Divi includes a Woo Products module (formally called the Shop module), which can display a grid of products from your WooCommerce store. The heights of the products can vary depending on their contents, leading to an uneven grid. Here's how to equalize the heights of the items in the Woo Products module grid.

First, here's how the grid looks with uneven items:

In this case it is the titles that are making the product heights uneven. The first title takes up one line, while the second takes up two, pushing the price further down.

While giving the main product box elements a fixed height might even up the border on the boxes, it wouldn't solve, for example, the position of the prices.

Set a Minimum Height on the Woo Products Module Titles

A better way to solve it is to set a minimum height for the element containing the title, and ensure that this is big enough to accommodate the longest title you anticipate having to display.

To set a minimum height on the Divi Woo Products Module titles:

  1. Open the Woo Products Module Settings
  2. Click on the "Advanced" Tab
  3. Click on the "Custom CSS" Toggle
  4. In the "Title" Field, enter the following CSS property:
 
min-height: 3.9em;
Like so:

You may need to increase or decrease the min-height to suit your design / title line height. Here's how the module looks with equal height titles:

Create a Seamless WooCommerce Experience

Enhance your WooCommerce store's appearance with Divi's design capabilities. Use the Divi Booster plugin to add custom features and improve your site's functionality, making your WooCommerce product displays more appealing and consistent.

About Dan Mossop

Dan is a Scottish-born web developer, now living in Brisbane with his wife and son. He has been sharing tips and helping users with Divi since 2014. He created Divi Booster, the first Divi plugin, and continues to develop it along with 20+ other Divi plugins. Dan has a PhD in Computer Science, a background in web security and likes a lot of stuff, 

4 Comments

  1. Thanks! I see you have the prices aligned to eachother at the bottom.

    How do I do that? Now if my titles differ in length, the price is exactly below it, making it look messy.

    Reply
    • Hey Isabel, this is done by setting a minimum height on the titles, as described in the "Set a Minimum Height on the Woo Products Module Titles" section. This ensures that all titles occupy the same amount of vertical space, which in turn keeps the prices consistently positioned. Note that if your titles sometimes stretch to three lines, you might want to increase the minimum height value specified in the post to accommodate this, so that everything still lines up nicely. I hope that helps, but if you aren't able to working, perhaps you can share a link to the page you're working so that I can look into it for you? Thanks!

      Reply
  2. thanks for your solution, helps a lot!

    Reply
    • You're welcome, Bell :)

      Reply

Submit a Comment

Comments are manually moderated and approved at the time they are answered. A preview is shown while pending but may disappear if your are cookies cleared - don't worry though, the comment is still in the queue.

Your email address will not be published. Required fields are marked *.

We may earn a commission when you visit links on our website.

Latest From Divi Booster

Enable Automatic Looping for YouTube Videos in the Divi Video Module

Enabling automatic looping for YouTube videos in your Divi video module ensures that content plays seamlessly and continuously without interruption. This feature can enhance user engagement, highlight key information, or create dynamic visual effects on your website....

Hide Video Controls in Divi Video Module

Disabling YouTube video controls in the Divi Video Module helps create a seamless, distraction-free viewing experience for your site visitors. This approach is useful when you want full control over how your video content appears and is interacted with on the page, or...

Mute YouTube Videos by Default in the Divi Video Module

In the Divi Video Module, starting your YouTube videos muted by default can create a more user-friendly browsing experience on your webpage. It is particularly beneficial for reducing distractions, enhancing visitor engagement, and providing a seamless content preview...

Autoplay Videos in Divi Video Module

Enabling videos in your Divi video module to start playing automatically can enhance both the site's design and user engagement. To ensure full compatibility with browser requirements, such as Chrome's autoplay policy, it's often necessary to start your videos muted...

How to Add the Post Status in Divi's Dynamic Content

Divi's Dynamic Content feature is great for enhancing your post/page templates with post-specific information. While Divi includes an option to show information such as the Post Created Date using Dynamic Content, there is no equivalent option for the Post Status....

Random Divi Posts