Change padding for single product page on mobile pages

This topic has 8 replies, 2 voices, and was last updated 3 months ago ago by Luca Rossi

  • Avatar: martijntje
    martijntje
    Participant
    September 2, 2025 at 16:17

    Hi,

    Is it possible to change the padding of the content on the single product page on the mobile version? So it has – for example – 20px padding left and right? Only on mobile, not on desktop.

    7 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    September 3, 2025 at 06:08

    Hello @martijntje,

    Thank you for reaching out to us.

    Yes, it is possible to adjust the padding of the content on the single product page specifically for the mobile version. You can achieve this by adding custom CSS to your site. For example:

    
    @media only screen and (max-width: 767px) {
        .single-product .content-page{
            padding-left: 20px;
            padding-right: 20px;
        }
    }
    

    Please make sure to add this code to your child theme’s style.css file or in the Customizer under Appearance > Customize > Additional CSS.

    If it doesn’t work, please provide us with your single product page URL.

    Best Regards,
    8Theme’s Team

    Avatar: martijntje
    martijntje
    Participant
    September 3, 2025 at 07:48

    Thanks! That works like a charm!

    Is it possible to have the breadcrumbs on this single product page on mobile also to have with extra padding on the left?

    Avatar: Justin
    Luca Rossi
    Support staff
    September 3, 2025 at 08:08

    Hi @martijntje,

    Please update the previous CSS code to this:

    
    @media only screen and (max-width: 767px) {
        .single-product .content-page,
        body.single-product .page-heading{
            padding-left: 20px !important;
            padding-right: 20px !important;
        }
    }
    

    Hope it helps!

    Avatar: martijntje
    martijntje
    Participant
    September 3, 2025 at 08:28

    Tnx – it moved – but too far 🙁

    Any thoughts?

    Files is visible for topic creator and
    support staff only.
    Avatar: Justin
    Luca Rossi
    Support staff
    September 3, 2025 at 09:21

    Dear @martijntje,

    We would like to suggest separating the following custom CSS code for better organization and clarity:

    
    @media only screen and (max-width: 767px) {
        .single-product .content-page {
            padding-left: 20px !important;
            padding-right: 20px !important;
        }
        body.single-product .page-heading {
            padding-left: 10px !important;
            padding-right: 10px !important;
        }
    }
    

    Please let us know how it works for you.

    Best regards,
    The 8Theme Team

    Avatar: martijntje
    martijntje
    Participant
    September 4, 2025 at 08:00

    Tnx – works like a charm!

    Avatar: Justin
    Luca Rossi
    Support staff
    September 4, 2025 at 09:18

    Dear @martijntje,

    You are most welcome!

    Best regards,
    The 8Theme Team

  • Viewing 8 results - 1 through 8 (of 8 total)

The issue related to '‘Change padding for single product page on mobile pages’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.