Hello,
I would like to reduce the padding only on mobile between the title and the collapsible content on my product page but I don’t know how to do.
Does anyone know how to do this please?
Website: https://6f3exa-pb.myshopify.com/
A user needed to reduce padding between the title and collapsible content sections on their product page, specifically on mobile devices only, in the Dawn theme.
Initial Solution:
.collapsible-content__heading and .collapsible-content__gridFinal Solution:
@media only screen and (max-width: 749px)) to target only mobile screens.collapsible-content__grid > div:nth-child(1) and .collapsible-content__header-container h2base.css file in the theme’s Assets folderStatus: Resolved - The mobile-specific solution successfully reduced padding without affecting desktop layout.
Hello,
I would like to reduce the padding only on mobile between the title and the collapsible content on my product page but I don’t know how to do.
Does anyone know how to do this please?
Website: https://6f3exa-pb.myshopify.com/
Hi @Ulysse12342
h2.collapsible-content__heading.inline-richtext.h2 {
margin-bottom: 0 !important;
}
.collapsible-content__grid {
margin-top: -25px !important;
}
Result:
Best,
Liz
Thanks it’s working but it also moves the padding on computer, is it possible to only do it on mobile please?
Hi @Ulysse12342
Try this one.
@media only screen and (max-width: 749px){
.collapsible-content__grid > div:nth-child(1) {
margin-top: 0;
}
.collapsible-content__header-container h2 {
margin-bottom: 0;
}
}
Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!
It’s perfect thanks!