I would like to only show this section on mobile - not desktop
For some reason the CSS custom did not work. https://chickpeaoats.com/products/protein-hot-cereal-free-bag
I would like to only show this section on mobile - not desktop
For some reason the CSS custom did not work. https://chickpeaoats.com/products/protein-hot-cereal-free-bag
Hey @chiaramunzi
Follow these Steps:
Go to Online Store
Edit Code
Find theme.liquid file
Add the following code in the bottom of the file above tag
RESULT
If I managed to solve your problem then, don’t forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Hello @chiaramunzi
To hide the nutrition facts section on desktop and show it only on mobile, you can use a simple media query in your custom CSS.
Here’s how you can do it:
Step-by-step CSS
/* Default: hide on desktop */
.hide-on-desktop {
display: none;
}
/* Show only on small screens (mobile) */
@media screen and (max-width: 749px) {
.hide-on-desktop {
display: block;
}
}
. Online Store > Themes > Customize > Theme settings > Custom CSS (if your theme supports it), or
. Online Store > Themes > Edit code > Assets > base.css or custom.css (depending on the theme).
If it’s still showing on desktop, the issue might be CSS caching or selector specificity.
Debug Tip:
Use the browser inspector and check if the .hide-on-desktop class is being overridden. You might need to add !important as a last resort:
.hide-on-desktop {
display: none !important;
}
@media screen and (max-width: 749px) {
.hide-on-desktop {
display: block !important;
}
}
Thank you ![]()
Please paste this code in the end of bundle.base.css file.
@media only screen and (max-width: 767px) {
.section-content.relative.z-10.py-section-vertical-spacing.px-section {
display: none;
}
}