How to Make the Divi Gallery Have 5 or More Columns
UPDATE: Please read the comments below this article too. They contain some additional helpful notes.
The Divi Gallery module has 4 columns by default (in the grid format). In today’s post I’m going to guide you on how you can make it have 5, 6 or more columns. Or, less than 4, for example 3 as well.
First of all, just create a Divi section, add a row and insert the Gallery module. Then in the design settings of the row choose “Use Custom Gutter Width: YES” and select 1 for “Gutter Width”.
After that in the Gallery module’s settings choose “Layout: Grid”, “Show Title and Caption: NO” and “Show Pagination: NO”. And upload your images for this gallery.
Then the most important thing to do is to add the following custom CSS code to the gallery module advanced settings. Add it to the “Gallery Item” field:
margin: 0 !important; width: 20% !important; clear: none !important;
This CSS code will make your gallery have 5 columns. If you want e.g. 6 columns, put 16.66% instead of 20%. The key here is to divide 100% by the number of columns that you want your gallery to have. For example, if you need just 3 columns, use 33.33%. And so on.
Good luck with creating your gallery!
For more Divi tutorials like this one, you can subscribe to my newsletter.

WordPress expert. Divi user since 2014. I blog about WordPress and Divi, my favorite WordPress theme. When I’m not working with WordPress or writing an article for this blog, I’m probably learning Italian. You can read more about me here.
Hi,
Thank you for your post – very helpful but please could I point out something you’ve missed so everyone can use it to benefit from it?
You forgot to mention that the number of images needs to be changed in the module setting, otherwise you will still only get 4 images displaying as it is the default setting and the extra images will not display even though there is room for them, with extra columns.
Hey, Thank you for your post! It was very helpful and worked exactly as explained.
One thing that may be worth mentioning is that if a person wants a gutter between their images the percentages will need to be adjusted slightly. In my case I wanted a three column gallery with a gutter and ended up using 31% for my width.
Fabulous thank you. and thanks to commenter Christine too, made for fast troubleshooting when only 4 images were showing.
Thank you for this post. Helpful.