How about the opposite? Displaying it on mobile but not desktop? Whats the code for that?
Topic summary
A user seeks to hide a video element on mobile devices while keeping it visible on desktop. Their initial CSS code uses media queries with min-width: 768px for desktop and max-width: 768px for mobile, but the video still appears on mobile.
Solutions offered:
- Add
!importantto thedisplay: nonerule in the mobile media query to override other styles - Reference a video tutorial about showing sections on specific devices
- Use alternative markup/code (specific code snippet mentioned but not visible in conversation)
The original poster confirmed one solution worked. A follow-up question asks about the reverse scenario: displaying video on mobile only, not desktop. This remains unanswered.
Status: Initial issue resolved; new related question pending response.