How do I display a different video for desktop and another for mobile with the Dawn theme?

Topic summary

A user seeks to display different videos for desktop (landscape) and mobile (portrait) on their Shopify Dawn theme homepage. They attempted using custom liquid sections with CSS media queries but encountered issues where both videos displayed on mobile.

Solution Provided:

  • Another user identified a missing closing brace “}” in base.css
  • Provided corrected CSS code using media queries:
    • Desktop (min-width: 481px): shows landscape video, hides portrait
    • Mobile (max-width: 480px): shows portrait video, hides landscape
  • Code successfully resolved the original issue

Extended Discussion:

  • Multiple users requested similar functionality for video banners (with text/buttons overlay)
  • A GitHub repository was shared with updated liquid code for separate desktop/mobile video sections
  • Subsequent refinements addressed:
    • Autoplay functionality
    • Container display options
    • Mobile content positioning
    • Video controls visibility
    • Dark overlay issues

Current Status:

  • Original issue resolved
  • Ongoing requests for adaptations to different themes (Impact) and specific requirements
  • Discussion remains active with users seeking customizations for their particular use cases
Summarized with AI on October 26. AI used: claude-sonnet-4-5-20250929.

Hello - thanks for the reply. So this works if I just want a different ‘video’, however what i am looking for is different ‘video banners’. That way I can put text/buttons over it.