Jump to content

Having two products appear side by side on mobile in 7.1

Recommended Posts

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

Hi,

I am trying to get two products to appear side by side on mobile for my homepage and other main pages throughout the site. I checked the forum and the following code was listed:

@media only screen and (max-width:640px) {
.products .list-grid {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.products .grid-item {
width: 48%;
}
}

However, I have tried this and it still doesn't work. Does anyone have any other ideas?

Thanks,

Nadia

Link to comment

I also used this code as a someone said it was a fix and it didn't work either:

<style>
  @media screen and (max-width:763px) {
.products.collection-content-wrapper .list-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    grid-column-gap: 5px;
    grid-row-gap: 5px;
}
}
</style>

Link to comment
On 7/29/2021 at 3:57 AM, PeriodicoEmporium said:

I also used this code as a someone said it was a fix and it didn't work either:

<style>
  @media screen and (max-width:763px) {
.products.collection-content-wrapper .list-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    grid-column-gap: 5px;
    grid-row-gap: 5px;
}
}
</style>

With homepage, add this to Design > Custom CSS

/* home 2 products row */
@media screen and (max-width:767px) {
div#page-section-6101a639f637f965fb180af8 .span-3 {
    width: 50% !important;
    float: left !important;
}
div#page-section-6101a639f637f965fb180af8 .span-3:nth-child(2n+1) {
    clear: left !important;
}
}

Can you share link to other pages?

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 7/30/2021 at 7:39 PM, PeriodicoEmporium said:

Oh my goodness! That worked. Thank you sooo much! 🙂

Do you still need help with other pages? Can you share their urls?

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 1 month later...
  • 7 months later...
4 hours ago, thenakedproject said:

I still cannot get this to work for me @tuanphan 😞

My site is thenakedproject.com.au

You mean products on this page? https://thenakedproject.com.au/store/empowered

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.