How to display more than 3 products per row in nopCommerce

The “Default Clean” theme in nopCommerce only support 3 products per row out of the box. There are times when store owners would like to increase this number and display more than 3 products per row. What’s the benefit in doing this? Well, if you have a lot of products in the categories, it means less scrolling for your customers as you will be displaying as much products on the screen.

So, if you are one of those who would like to display more than 3 products per row in nopCommerce categories then this tutorial is for you.

As, we are talking about products per row that means we need to look into the “item grid”.

Let’s open the “styles.css” of Default Clean theme:

Look for this code in your stylesheet:

.item-box {
width: 32.33333%;
margin: 0 0.5% 50px;
}

32.33% is representing the width for each product item-grid. So, if you reduce this, basically you will be creating space for the 4th product item-grid box.

This is where you define how many product item-grid boxes you will trying to fit in the space. You must be wondering, what is “nth-child”? It is a CSS pseudo-selector and it basically select every nth list item. In order to add 4th product box, we will add/update our CSS code like this:

Author Spotlight

Lavish Kumar

Founder, developer and owner of StrivingProgrammers.com - By profession, he is a software programmer / web developer, web designer & DBA. He is passionate about technology and electronic gadgets. He enjoys writing tech articles and developing web applications. He is a nopCommerce MVP and author of official nopCommerce Designer's Guide.