Make a Grid on Product Page

Hey,

does anybody know how to i can make a grid on my Product Page?

Should look something like this:

URL: sixdreamz.com

Like on this Site:

Hi @sixdreamz

check this one. The design varies when you have more products btw.

From your Shopify admin dashboard, click on “Online Store” and then “Themes”.

Find the theme that you want to edit and click on “Actions” and then “Edit code”.

In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:

li.grid__item.scroll-trigger.animate--slide-in:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(4)) {
    border-top: 1px solid;
    border-right: 1px solid;
}

li.grid__item.scroll-trigger.animate--slide-in:not(:nth-child(4)) {
    border-right: 1px solid;
}

li.grid__item.scroll-trigger.animate--slide-in:not(:nth-last-child(-n+2)) {
    border-bottom: 1px solid;
}

ul#product-grid {
    gap: 0;
}

And Save.

Result:

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Hey @sixdreamz

Follow these Steps:

  1. Go to Online Store
  2. Edit Code
  3. Find theme.liquid file
  4. Add the following code in the bottom of the file above tag.

RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

the lines which collide a more thicker then the other ones? is there a way to get around?

Hi @sixdreamz ,

May I suggest to update code these steps:

  1. Go to Store Online-> theme → edit code

  1. Assets/base.css
  2. Add code below to end of file
body ul#product-grid {
  justify-content: left !important;
  border-top: 1px solid black!important;
  border-left: 1px solid black!important;
}
ul#product-grid .grid__item {
  border-right: 1px solid black!important;
  border-bottom: solid 1px black!important;
  border-left: none!important;
  border-top: none!important;
}
@media screen and (min-width: 990px) {
  ul#product-grid.grid--4-col-desktop .grid__item {
    width: 25%;
    max-width: 25%;
  }
}
@media screen and (min-width: 750px) and (max-width: 989px) {
  ul#product-grid.grid--2-col-tablet-down .grid__item {
    width: 50%;
    max-width: 50%;
  }
}
@media screen and (max-width: 749px) {
  ul#product-grid.grid--4-col-desktop .grid__item {
    width: 50%;
    max-width: 50%;
  }
}

can you look at the website? it doesnt work how it worked when you did it.

also is there a way to put the 2 products in the second line in the center? like that:

Hi,

You can use code below:

body ul#product-grid {
  gap: 0!important;
  justify-content: center!important;
  border-top: 1px solid black!important;
  border-left: none !important;
}
ul#product-grid .grid__item {
  border-right: 1px solid black !important;
  border-bottom: solid 1px black !important;
  border-left: solid 1px black !important;
  border-top: none !important;
  margin-left: -1px;
}
@media screen and (min-width: 990px) {
  ul#product-grid.grid--4-col-desktop .grid__item {
    width: 25%;
    max-width: 25%;
  }
}
@media screen and (min-width: 750px) and (max-width: 989px) {
  ul#product-grid.grid--2-col-tablet-down .grid__item {
    width: 50%;
    max-width: 50%;
  }
}
@media screen and (max-width: 749px) {
  ul#product-grid.grid--4-col-desktop .grid__item {
    width: 50%;
    max-width: 50%;
  }
}