A user needed to hide a hero section containing a video on their About page for desktop views only, while keeping it visible on mobile. The video wasn’t displaying correctly on desktop due to cropping issues.
Initial Attempt:
Tried using CSS media query targeting .hero__container with display: none
This resulted in an unwanted black box appearing on desktop instead of hiding the section completely
Working Solution:
Another user provided custom CSS code to add to the theme’s base.css file:
Uses a media query for screens 750px and wider
Targets the specific section ID with display: none !important
Successfully hides the hero section on desktop while preserving mobile display
Resolution: The solution worked perfectly, and the issue was resolved.
Summarized with AI on October 23.
AI used: claude-sonnet-4-5-20250929.
Am wanting to hide a hero section that shows a video on my “About” page but only for desktop views, as the video crops/doesnt display right on desktop. SO keep it for mobile, hide on desktop.
I have tried various bits of code from this forum but none have worked.
Thank you for your response. It’s good to know that it’s worked for you. Kindly feel free to get back to me if you need any further assistance. If helpful, please like all posts.