Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Displaying 2 columns / Related Products / Mobile


Esquirebr

Question

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

Hi,

I’m trying to make the ‘related products’ displayed in 2 columns for mobile users.

I’m currently using the code below to display the product page in 2 columns and it works perfectly,  how can I tweak it in order to also make it apply to related products?


Many thanks in advance. 

 

@media only screen and (max-width: 700px) {
  #productList .product {
    clear: none!important;
    margin-bottom: 2em;
    width: 48%;
  }
  #productList .product:nth-of-type(odd) {
    margin-right: 3%;
    clear: left;
  }
  .product img {
    max-width: 100%;
    max-height: 100%;
  }
}

 

Link to comment
  • Answers 11
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

11 answers to this question

Recommended Posts

  • 1
@media only screen and (max-width: 640px) {
  .ProductItem-relatedProducts-item {
    float: left;
    margin-bottom: 2em;
    width: 48%;
  }
  .ProductItem-relatedProducts-item:nth-of-type(odd) {
    margin-right: 3%;
    clear: left;
  }
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours.

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
On 3/9/2020 at 5:25 AM, raego said:

Add to Home > Design > Custom CSS

@media screen and (max-width:767px) {
.list-grid {
    grid-column-gap: 10px;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours.

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
  • 0
On 3/7/2020 at 3:24 AM, tuanphan said:

@media only screen and (max-width: 640px) {
  .ProductItem-relatedProducts-item {
    float: left;
    margin-bottom: 2em;
    width: 48%;
  }
  .ProductItem-relatedProducts-item:nth-of-type(odd) {
    margin-right: 3%;
    clear: left;
  }
}

 

Any idea how to add padding down the middle?

 

IMG_7927.PNG

Link to comment
  • 0
On 11/15/2021 at 8:38 AM, raego said:

This code now seems to be showing up weird on product pages. They are still in 2 columns but one column is bigger than the other, any idea how to fix?

1292924033_ScreenShot2021-11-15at12_36_09pm.thumb.png.e6c81552df32d4539d0fa37bd517f6bb.png

raegocreative.com.au/shop

in this code

@media screen and (max-width: 767px) {
    .list-grid {
        grid-template-columns: repeat(2,auto) !important;
        display: grid;
        float: left !important;
    }
}

change 

auto

to

1fr

 

Email me if you have need any help (free, of course.). Answer within 24 hours.

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
  • 0
On 11/18/2021 at 12:28 PM, tuanphan said:

in this code

@media screen and (max-width: 767px) {
    .list-grid {
        grid-template-columns: repeat(2,auto) !important;
        display: grid;
        float: left !important;
    }
}

change 

auto

to

1fr

 

Thanks - but this makes products go back to 1 column not 2. 

Link to comment
  • 0
On 11/26/2021 at 4:15 AM, raego said:

Thanks - but this makes products go back to 1 column not 2. 

I think you edit wrong thing, 1fr still make it to 2 columns. 

Add this code

@media screen and (max-width: 767px) {
    .list-grid {
        grid-template-columns: repeat(2,1fr) !important;
        display: grid;
        float: left !important;
    }
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours.

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...