Jump to content

Centering Products on Shop Page (Desktop)

Go to solution Solved by Beyondspace,

Recommended Posts

Hi all, 

I'm trying to get the products on my shop page to center. I got some code that worked great to center the products on mobile, but the products on desktop are still slightly to the left. Can someone help me with some custom css I can plugin?

Here is the code I am using to center them on mobile:

@media screen and (max-width:767px) {
.products.collection-content-wrapper .products-flex-container .list-grid .grid-item {
    margin: 0 auto;
}
}

Screen shot attached of the desktop view, which is off-center.

Thank you!

Screen Shot 2023-03-04 at 11.13.10 AM.png

Link to comment
21 hours ago, j_m_g said:

Hi all, 

I'm trying to get the products on my shop page to center. I got some code that worked great to center the products on mobile, but the products on desktop are still slightly to the left. Can someone help me with some custom css I can plugin?

Here is the code I am using to center them on mobile:

@media screen and (max-width:767px) {
.products.collection-content-wrapper .products-flex-container .list-grid .grid-item {
    margin: 0 auto;
}
}

Screen shot attached of the desktop view, which is off-center.

Thank you!

Screen Shot 2023-03-04 at 11.13.10 AM.png

Can you share your URL so I can take a look?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • Solution

I believe that this code makes your products smaller with only 80% of width. So they are not at aligned center.

image.thumb.png.31b622a112b065865efa8b1faa36a7b8.png

Try removing this code or add the following code to overwrite the one one

.products.collection-content-wrapper .products-flex-container .list-grid .grid-item {
  width: 100%;
}

Support me by pressing 👍 or marking as solution if this is useful for you

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

My testing

image.thumb.png.60ab2399253d4668493b3b4af1fa78c1.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.