Jump to content

Changing Product Layout on Shop Pages for Mobile

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://www.immyhowardmillinery.com/bandanna-bows

Hi there, 

I am in the process of building some product pages on my website (the current products listed are demos set up by my Squarespace template and are unlinked, but the pages are enabled) and the current layout of my products is 3 per row on Desktop view.

I am trying to alter the mobile view of my product pages to have 2 products per row, instead of 1 product per row. 

Is there a way I would be able to do this? Any help would be much appreciated. I am very new to using Squarespace so apologies if I have overlooked anything obvious!

Cheers

Immy

@tuanphanI see you seem to be a wizard at this! Hoping you might be able to possibly help me at all? Thanks!

1.jpg

2.jpg

Edited by Guest
Link to comment
17 hours ago, ImmyH said:

Site URL: https://www.immyhowardmillinery.com/bandanna-bows

Hi there, 

I am in the process of building some product pages on my website (the current products listed are demos set up by my Squarespace template and are unlinked, but the pages are enabled) and the current layout of my products is 3 per row on Desktop view.

I am trying to alter the mobile view of my product pages to have 2 products per row, instead of 1 product per row. 

Is there a way I would be able to do this? Any help would be much appreciated. I am very new to using Squarespace so apologies if I have overlooked anything obvious!

Cheers

Immy

@tuanphanI see you seem to be a wizard at this! Hoping you might be able to possibly help me at all? Thanks!

1.jpg

2.jpg

try adding this to Design->Custom CSS

@media only screen and (max-width: 700px) {
  #productList {
      display: flex;
      flex-wrap: wrap;
  }  
  #productList .product {
      float: left;
      margin-left: 0;
      margin-top: 0;
      flex: 50%;
      padding: 1%;
      box-sizing: border-box;
      margin-bottom: 0%;
  }  
}

image.png.44c9937598b75e2836a8799f332bdced.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
  • 3 weeks later...
  • 2 weeks later...
On 4/14/2021 at 4:24 PM, tuanphan said:

Some feedback on your site, hope it uselful

Site URL: https://www.immyhowardmillinery.com/

1. (Tablet-Shop page) Want to move nav category to top of page?

immyhowardmillinery.com-tablet-shop-page

2. (Mobile-Shop) Add category text next to plus icon?

immyhowardmillinery.com-mobile-shop-min.

3. (Tablet-Product) Move category nav to top of product? & increase description width?

immyhowardmillinery.com-tablet-product-m

4. (Mobile-Footer) back to top doesn’t work

immyhowardmillinery.com-mobile-footer-mi

5. (Tablet-Footer) Add back to top on tablet?

immyhowardmillinery.com-tablet-footer-mi

Hi Tuanphan, 

Thank you so much for your website feedback, it really is so appreciated, and I am hoping to get some of these errors/amendments fixed- thank you! I was wondering if I might be able to gain a little more of your expertise on a couple of things...

-Do you know how I might be able to move my Nav catergory to the top of my page on tablet view at all?

-Is there a way in which I can add catergory text next to the plus icon? I would really like to be able to do this most importantly, if possible. 

 

Finally, if you or anyone on the server knew of a way in which I might be able to make my 'add to cart' button at the top of my product description, rather than at the bottom, that would be marvellous. Thank you ever so much!

 

Best wishes

 

Immy

Link to comment
On 4/22/2021 at 6:38 PM, ImmyH said:

Hi Tuanphan, 

Thank you so much for your website feedback, it really is so appreciated, and I am hoping to get some of these errors/amendments fixed- thank you! I was wondering if I might be able to gain a little more of your expertise on a couple of things...

-Do you know how I might be able to move my Nav catergory to the top of my page on tablet view at all?

-Is there a way in which I can add catergory text next to the plus icon? I would really like to be able to do this most importantly, if possible. 

 

Finally, if you or anyone on the server knew of a way in which I might be able to make my 'add to cart' button at the top of my product description, rather than at the bottom, that would be marvellous. Thank you ever so much!

 

Best wishes

 

Immy

Hi,

The shop page url doesn't exist. Can you check again?

https://www.immyhowardmillinery.com/bandanna-bows

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
  • Solution
On 5/5/2021 at 4:13 PM, ImmyH said:

Hi Tuanphan!

My apologies, here is the correct URL! Thanks ever so much again

 

https://www.immyhowardmillinery.com/bows

Add to Design > Custom CSS > then save & reload your site

/* Move sidebar nav to top of page tablet */
@media screen and (max-width:900px) and (min-width:641px) {
div#categoryNav {
    width: 100%;
    padding-right: 0 !important;
}
ul.category-nav-links {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}
li.nav-section-label {
    flex: 1 1 100%;
    text-align: center;
}
ul.category-nav-links>li:not(:first-child) {
    margin-right: 2.8vw;
}
.collection-type-products.view-list div#content {
    width: 100% !important;
}
}
/* Add category text next to plus icon */
@media screen and (max-width:640px) {
.category-nav-toggle:before {
    content: "Category";
    display: block;
    text-align: left;
    position: relative;
    bottom: -10px;
}
}

Finally, if you or anyone on the server knew of a way in which I might be able to make my 'add to cart' button at the top of my product description, rather than at the bottom, that would be marvellous. Thank you ever so much!

it looks like you solved this?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
10 minutes ago, tuanphan said:

Add to Design > Custom CSS > then save & reload your site


/* Move sidebar nav to top of page tablet */
@media screen and (max-width:900px) and (min-width:641px) {
div#categoryNav {
    width: 100%;
    padding-right: 0 !important;
}
ul.category-nav-links {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}
li.nav-section-label {
    flex: 1 1 100%;
    text-align: center;
}
ul.category-nav-links>li:not(:first-child) {
    margin-right: 2.8vw;
}
.collection-type-products.view-list div#content {
    width: 100% !important;
}
}
/* Add category text next to plus icon */
@media screen and (max-width:640px) {
.category-nav-toggle:before {
    content: "Category";
    display: block;
    text-align: left;
    position: relative;
    bottom: -10px;
}
}

Finally, if you or anyone on the server knew of a way in which I might be able to make my 'add to cart' button at the top of my product description, rather than at the bottom, that would be marvellous. Thank you ever so much!

it looks like you solved this?

Hi Tuanphan!

Yes, thanks to your amazing help- I was able to solve the Add to cart issue! I cannot thank you enough. The tablet coding situation has also worked a treat as well, along with the category text! You are a total genius. Thank you. I am very new to all of this so appreciate your help SO much.

 

Thanks again!
Best wishes

Immy

Link to comment
On 5/10/2021 at 2:53 PM, ImmyH said:

Hi Tuanphan!

Yes, thanks to your amazing help- I was able to solve the Add to cart issue! I cannot thank you enough. The tablet coding situation has also worked a treat as well, along with the category text! You are a total genius. Thank you. I am very new to all of this so appreciate your help SO much.

 

Thanks again!
Best wishes

Immy

You're welcome.

If you have any other problems, just reply here, or you can also create new question. We always ready to help.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
6 minutes ago, tuanphan said:

You're welcome.

If you have any other problems, just reply here, or you can also create new question. We always ready to help.

Thank you, that is so appreciated! I have dropped a message over your way on another question I posted about potentially creating 2 buttons on my website homepage banner instead of one 🙂 if you would like me to send that here or if there is any extra info you need, just let me know. Cheers again!

Link to comment
On 5/12/2021 at 3:03 PM, ImmyH said:

Thank you, that is so appreciated! I have dropped a message over your way on another question I posted about potentially creating 2 buttons on my website homepage banner instead of one 🙂 if you would like me to send that here or if there is any extra info you need, just let me know. Cheers again!

Can you share link to this question?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 year later...

Hi Please could you help me with this same issue, I would like the products on mobile to have 2 side by side with a small white gap in the middle of the products.

www.scrunchme.co.uk 

 

I currently have this code on my site to have them next to each other - 

@media screen and (max-width: 767px) {
div#block-d1ce7c4167f1c59211a0, [data-section-id="60da3910ceea0479fbfe9006"] .content-wrapper, [data-section-id="619acd562bb7196d4e128ddb"] .content-wrapper,
   div#block-1f282f5221a1235694a5 {
    padding-top: 0px !important;
}

Link to comment
9 hours ago, CoralDerfurt said:

Hi Please could you help me with this same issue, I would like the products on mobile to have 2 side by side with a small white gap in the middle of the products.

www.scrunchme.co.uk 

 

I currently have this code on my site to have them next to each other - 

@media screen and (max-width: 767px) {
div#block-d1ce7c4167f1c59211a0, [data-section-id="60da3910ceea0479fbfe9006"] .content-wrapper, [data-section-id="619acd562bb7196d4e128ddb"] .content-wrapper,
   div#block-1f282f5221a1235694a5 {
    padding-top: 0px !important;
}

Do you mean this part?

image.png.59e93fd94d95a1cd0b14a63d929d6184.png

Try adding to Home > Design > Custom Css

@media only screen and (max-width: 767px) {
  #block-c126541c7ea03f87cae9 .slide.sqs-gallery-design-grid-slide {
    width: 48% !important;
    margin: 2px;
  }
}

Support me by pressing 👍  or marking as solution if this 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

Hi,

Thank you so much for your reply! I really appreciate your help, I've attached an image of where I want a small amount of white space. In-between the products as at the moment they are so close together. I have a bit of code on my site I will paste everything below as I'm not sure if something in there might be blocking this. 

Thank you so much again!

Coral

 

/* 2 Column Product Grid */
@media only screen and (max-width:640px) {
.products .list-grid {
display: flex;
flex-wrap: wrap;
justify-content: ;
}
.products .grid-item {
width: 50%;
}
}

/* Cart Title */
.cart-title {
  font-size: 0!important;
}
.cart-title:before {
  text-transform: none!important;
  font-size: 24px!important;
  content: "Shopping Cart";
}


/* Sold out text */
.product-mark.sold-out {
    text-transform: capitalize !important;
}


/* Product slide arrows control */
@media screen and (max-width:767px) {
.ProductItem-gallery-carousel-controls {
    display: flex !important;
}
/* arrows background */
.ProductItem-gallery-carousel-controls * {
    background: white;
}
.ProductItem-gallery-carousel-controls>div {
    justify-content: center !important;
}
.ProductItem .ProductItem-gallery-carousel-controls>div::after, .ProductItem .ProductItem-gallery-carousel-controls>div::before {
    border-color: black !important;
}
}

/* Show category nav links */
div.nested-category-tree-wrapper {
    display: flex !important;
    float: none !important;
    min-width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
}
section.products.collection-content-wrapper.products-list {
    flex-direction: column !important;
    display: flex;
}
.nested-category-tree-wrapper>ul {
    width: 100% !important;
    display: flex;
    justify-content: center;
    align-items: center;
}
.nested-category-tree-wrapper>ul li {
    margin-left: 2vw;
}
nav.nested-category-breadcrumb {
    display: none !important;
}
ul.nested-category-children {
    display: none !important;
}

@media screen and (max-width: 800px) {
    .homepage .gallery-fullscreen-slideshow {
        height: 53vh !important;
    }

    .homepage .gallery-fullscreen-slideshow[data-width="full"] {
        height: 20vh !important
    }
    .homepage .gallery-fullscreen-slideshow img {
    object-fit: contain !important;
}
}

@media screen and (max-width:767px) {
.collection-5e77e8500ff82c23205f2869.view-item #page section:nth-child(1) {
    min-height: 50vh !important;
}
}

.page-section.gallery-section {
padding-top: 0px !important;
}
@media screen and (min-width: 640px) {
.gallery-fullscreen-slideshow {
height: 120vh !important;
}
}
@media screen and (max-width: 600px) {
.gallery-fullscreen-slideshow {
height: 200vh !important; // Change this value to modify gallery height on mobile
}
}
.gallery-fullscreen-slideshow[data-show-captions="true"][data-width="full-bleed"] {
margin-bottom: 0;
}

@media screen and (max-width: 575px) {
  .products.collection-content-wrapper .nested-category-children {
    display: block;
  }
  .products.collection-content-wrapper .nested-category-breadcrumb-list-item {
    display: block;
    text-align: left;
}
  .products.collection-content-wrapper .breadcrumb-separator {
    display: none;
  }
  
}
/* Space between products */
@media screen and (max-width:767px) {
.products.collection-content-wrapper .grid-item.is-loaded {
    margin-bottom: 20px;
}
}


@media only screen and (max-width: 575px) {
.products.collection-content-wrapper .nested-category-children {
    padding-top: 30px;
    flex-wrap: wrap;
    overflow-x: hidden;
    justify-content: center;
  }

}
@media only screen and (max-width: 575px) {
.products.collection-content-wrapper .nested-category-breadcrumb {
    text-align: center;
  }
  
}
@media screen and (max-width: 767px) {
div#block-d1ce7c4167f1c59211a0, [data-section-id="60da3910ceea0479fbfe9006"] .content-wrapper, [data-section-id="619acd562bb7196d4e128ddb"] .content-wrapper,
   div#block-1f282f5221a1235694a5 {
    padding-top: 0px !important;
}


[data-section-id="620c0ad499afc22e16b48e25"]  .gallery.gallery-section-wrapper {
        height: 50vh;
}
[data-section-id="620c1742add4ae45a3027dce"]  .gallery.gallery-section-wrapper {
    height: 47vh;
}
}


@media screen and (max-width: 700px) {
div#block-d1ce7c4167f1c59211a0, [data-section-id="60da3910ceea0479fbfe9006"] .content-wrapper, [data-section-id="619acd562bb7196d4e128ddb"] .content-wrapper,
   div#block-1f282f5221a1235694a5 {
    padding-top: 10px !important;
}
[data-section-id="620c0ad499afc22e16b48e25"]  .gallery.gallery-section-wrapper {
        height: 50vh;
}
[data-section-id="620c1742add4ae45a3027dce"]  .gallery.gallery-section-wrapper {
    height: 47vh;
}
}

@media only screen and (max-width: 767px) {
  #block-c126541c7ea03f87cae9 .slide.sqs-gallery-design-grid-slide {
    width: 48% !important;
    margin: 2px;
  }
}

IMG_3374.jpg

Link to comment

Add this to Design > Custom CSS

@media screen and (max-width:767px) {
.products .list-grid {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    grid-gap: 10px 10px;
}
.products .list-grid>div {
    width: 100% !important;
    margin: 0 !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 8 months later...
22 hours ago, dmessi said:

i have the same problem! i got it to be rows of 3 for phone view but i put in the above code because i had no spacing between photos and its not working! Help! it looks sooooo bad lololol

Screenshot (14).jpg

Use this code

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 month later...
On 9/8/2023 at 4:11 PM, aychenn said:

Hi,  I am trying to do the same thing on my shop page! Tried some of these codes but it doesn't go 2 x 2 it just goes in a long line.

https://www.healbyandrewlethbridge.com/store-2

 

Screenshot 2023-09-08 at 10.10.43.png

Use this code to Website > Website Tools > Custom CSS

/* Product 2 columns mobile */
@media screen and (max-width:767px) {
    .products.collection-content-wrapper .list-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-column-gap: 10px;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

 

 

5 hours ago, tuanphan said:
/* Product 2 columns mobile */
@media screen and (max-width:767px) {
    .products.collection-content-wrapper .list-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-column-gap: 10px;
}
}

Hi @tuanphan I'm trying to style the mobile prettyflowerfarm.com shop with two columns as well. I tried the css codes, but they are not working. I've also noticed an error message "missing closing '}' at the bottom of the css, but cannot find where to add it. Can you please help? Thank you!

Link to comment
On 9/12/2023 at 10:53 PM, Jillg said:

 

 

Hi @tuanphan I'm trying to style the mobile prettyflowerfarm.com shop with two columns as well. I tried the css codes, but they are not working. I've also noticed an error message "missing closing '}' at the bottom of the css, but cannot find where to add it. Can you please help? Thank you!

If missing closing } error appear, some or all CSS code won't work properly. Can you send all current code? We can check easier

With 2 columns, use this new code to Settings > Developer Tools > Code Injection > Header

<style>
  @media screen and (max-width: 767px ) {
    .products.collection-content-wrapper .list-grid {
        display:grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-column-gap: 30px;
        grid-row-gap: 0px;
        padding: 0;
    }
    .products.collection-content-wrapper .grid-item {
        width: 100% !important;
    }
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

As a note to anyone wanting a 2-column grid on their mobile product page, this feature has been added to the store section settings. You can find it by editing the store section and toggling the mobile view:

image.thumb.png.0dd0596dc5fb82519688f6cd616d55d8.png

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

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.