[Resolved] adjust space of related products mobile view

Home Forums Support [Resolved] adjust space of related products mobile view

Home Forums Support adjust space of related products mobile view

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #897110
    José

    Hello, I am trying to adjust the space of the related products in the mobile view, I would like the space between them to be smaller. I found a grid screen that regulates this: grid-gap:15px

    .wc-columns-container .products,.woocommerce .related ul.products,.woocommerce .up-sells ul.products{display:-ms-grid;display:grid;grid-gap:50px;width:100%}

    you could help me apply this only for the mobile version ….

    Thank you

    #897146
    Leo
    Staff
    Customer Support

    Hi there,

    You can try using @media to apply it only to mobile:
    https://docs.generatepress.com/article/responsive-display/#responsive-breakpoints

    Let me know if this helps 🙂

    #897236
    José

    Hello Leo, thanks for your help, look at it I tried it in several ways, this is the last one but it does not work …

    @media (max-width: 768px) {
    .woocommerce .related ul.products {display:-ms-grid;display:grid;grid-gap:15px}
    }

    this error marks me

    #897241
    Leo
    Staff
    Customer Support

    Can you link me to the site in question?

    #897247
    José

    OK, sent

    #897249
    Leo
    Staff
    Customer Support

    Can you clear and disable the caching plugin first?

    #897253
    José

    the staging environment has caching disabled.
    I do not have the option to disable it.

    #897261
    Leo
    Staff
    Customer Support

    Hmm are you sure about that? That would be inconvenient for sure.

    Give this CSS a shot:

     .woocommerce .related ul.products, .woocommerce .up-sells ul.products {
        grid-gap: 20px;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Make sure to clear your cache.

    #897272
    José

    This was answered by Kinsta support:

    The Kinsta cache can not be skipped in the active site. In the staging, it was always diverted. If you need to test a particular page, you can attach it to the query string at the end of the URL to skip the cache. For example …
    yourdomain.com/pagehere/?nocache

    I added the css, but it keeps marking me error

    #897274
    Leo
    Staff
    Customer Support

    Just a warning. I tested the code and it should work.

    #897279
    José

    Yes, if it works, I thought that if you mark a warning, it could not be added …

    #897282
    Leo
    Staff
    Customer Support

    Nope warnings are just warnings. I think WordPress needs to update Additional CSS that’s all.

    Looks like it’s working?

    #897283
    José

    Ok, I understand … if it works.

    Thank you

    #897296
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.