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.
This topic has 8 replies, 2 voices, and was last updated 3 months ago ago by Luca Rossi
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.
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
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?
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!
Tnx – it moved – but too far 🙁
Any thoughts?
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
Tnx – works like a charm!
Dear @martijntje,
You are most welcome!
Best regards,
The 8Theme Team
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