Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Make Video Centered On Mobile



Site URL: https://scarlet-grape-g5ln.squarespace.com

I need help with centering my home page's first video that autoplays on mobile without affecting the desktop version.

On mobile, it only shows the bottom right corner of the video but in the top left corner of the block.

My current code that I am using for this is below (from @codeandtonic @8640-codeandtonic)

Section background image 16:9 video

//show on mobile
section.page-section[data-section-id="61019a7c2ef1a604d30e6b10"] {

display: block;


// show on desktop
html.no-touch section.page-section[data-section-id="61019a7c2ef1a604d30e6b10"] {

  display: block !important;}

section.page-section[data-section-id="61019a7c2ef1a604d30e6b10"] {
  //16:9 spacer
  padding-bottom: 56.25%;
  min-height: 0 !important;
    .section-background  .sqs-video-background iframe {
    //make it the size of parent no matter what automatic JS it would like to do
    border-width: 0;
    position: absolute !important;
    top: 5.5vh !important;
    left: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    height: 10vh;
    width: 100% !important;
    height: 100% !important;
  // blocks would be here but we won't have any
    display:none !important;




Link to comment
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...