I want to add product divider on my products

Topic summary

A Shopify store owner using the Impulse theme wants to add borders/dividers around individual products on their collection pages, similar to a reference example they provided.

Initial Solutions Provided:
Multiple users offered CSS code snippets targeting classes like .grid-product__content and .grid__item.grid-product, adding borders and minimum heights. These solutions involved editing the theme’s CSS file through the Shopify admin (Online Store > Themes > Edit Code).

Ongoing Issues & Refinements:

  • Mobile responsiveness: Initial code worked on desktop but not on mobile/iPad, leaving uneven spacing and layout problems
  • Featured categories: The store owner also needed borders applied to featured category sections, not just product grids
  • Alignment problems: Products and text weren’t properly centered on mobile devices
  • Spacing issues: Extra whitespace appeared on mobile, disrupting user experience

Current Status:
The discussion remains active with iterative CSS fixes being provided. The most recent solution (post #12) addresses centering issues using flexbox properties and padding adjustments. Each fix targets specific responsive breakpoints and layout problems as they emerge during testing across different devices.

Summarized with AI on November 2. AI used: claude-sonnet-4-5-20250929.

The first picture is the snippet from my site stationerbylucky.com and i want to add product divider or boarders to every individual product as highlighted & shown in 2nd picture

Theme : Impulse

Hi @Stationerbyluck ,

1. Go to the Theme Editor:

  • In your Shopify admin, go to Online Store > Themes > Find the Impulse theme > Actions > Edit Code
  • In the left-hand panel, search for the CSS or SCSS file. Typically, it’s under Assets with a name like theme.css or styles.scss.liquid
  • Scroll to the bottom of the CSS file and add the following code:
.grid-product__content {
    position: relative;
    border: 1px solid #ddd; /* Change the color and width as needed */ 
    text-align: left;
}

Hi @Stationerbyluck

I hope you are well. You can follow our instructions below:

1/ Shopify admin > Online store > Customize: https://prnt.sc/XQ6IDB99kUCd
2/ From the left menu > Theme settings > Open Custom CSS: https://prnt.sc/iDxwa8zBQ4Z-
3/ Copy the code below and paste it there

Here is the code for Step 3:

.grid__item.grid-product {
    border: 1px solid black;
    min-height: 338px !important;
}

Please let me know if it works. Thank you!

Hi @Stationerbyluck

Add CSS code, steps as shown in the figure

.grid-product__content {
  position: relative;
  text-align: left;
  border: 1px solid;
  min-height: 430px;
}

Thanks for your Solution secondly frames around the product is un-even

How do i fix & i need frame everywhere on the featured categoies also

Hey Your code worked only for desktop version not optimized in mobile version nor on ipad

Secondly i also want these divider on featured categories also

@Stationerbyluck for featured categories:

Go to Online Store > Themes > Actions > Edit code

Select Assets > theme.scss.liquid or custom.css

Paste the following CSS snippet at the bottom of your stylesheet:

@media only screen and (min-width: 769px) {
    .collection-item {
        margin-bottom: 22px;
        border: 1px solid;
        min-height: 300px;
    }
}

Click save.

Let me know if you need further assistance!

Hi @Stationerbyluck ,

Go to Online Store > Themes > Actions > Edit Code > theme.scss.css
Add below code in theme.scss.css file

body .grid__item.small--one-half.medium-up--one-quarter {
    border: 1px solid #000;
    margin: 10px;
}
body .grid-product__content {
    border: 0;
}
@media only screen and (min-width: 769px) {
    body .medium-up--one-quarter {
       width: calc(25% - 20px);
    }
}
@media only screen and (max-width: 769px) {
    body .small--one-half {
       width: calc(50% - 20px);
    }
}

Its working well but when i open my phone it leaves additional space as mentioned in below image

it did’t need the additional space as it distrupts the ux of the customer

Hi @Stationerbyluck ,

Add the below css

@media only screen and (max-width: 480px) {
    body .grid-product__content {
      min-height: 285px;
  }
}

Hey Thanks for your gentle help ,thing i am stuck with is below the products are not centered

secondly text too are not centered aligned

Add below css

body .grid__item.small--one-half.medium-up--one-quarter {
    padding: 5px;
}
[data-section-type="collection-template"] .grid.grid--uniform {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}