How to get custom code to stretch video from edge to edge

Topic summary

A user needed help making a custom video section stretch edge-to-edge on their Shopify store (lejardinbridal.com). They had implemented custom code for a video section with text overlay and button, but the video appeared cropped and didn’t extend to the screen edges.

Troubleshooting process:

  • Initially identified that the video ratio matched the section, but appeared smaller due to the section’s width constraints
  • Attempted adjusting theme settings (Online store > Theme > Customize > Theme Settings > Layout) which improved the display but didn’t fully resolve the issue

Solution:
Adding custom CSS to the section resolved the problem:

.image-with-text {
  max-width: 100% !important;
  padding: 0px !important;
}

This code forces the section to full width and removes padding, allowing the video to display edge-to-edge as intended. The issue was successfully resolved.

Summarized with AI on November 16. AI used: claude-sonnet-4-5-20250929.

Hi @mimiT

You can try to change setting of your page with in Online store > Theme > Customize > Theme Settings > Layout