Jump to content

Fit Background Video on Mobile

Recommended Posts

  • Replies 4
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

First, edit this CSS

section[data-section-id="611282352e5bfe168df6dbfd"] {
    width: 100% !important;
    height: 100vh !important;
}

to this

@media screen and (min-width:992px) {
section[data-section-id="611282352e5bfe168df6dbfd"] {
    width: 100% !important;
    height: 100vh !important;
}
}

Next, add this CSS

/* resize home top video mobile */
@media screen and (max-width:767px) {
    [data-section-id="611282352e5bfe168df6dbfd"] video {
        width: 100% !important;
        height: auto !important;
        left:0 !important;
    }
     [data-section-id="611282352e5bfe168df6dbfd"] {
         min-height: unset !important;
         height: 30vh !important;
     }
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Hey @tuanphan

Thanks for the help!

I have a few bugs regarding the background video that I hope you'd be able to help with. 

1. How can I get rid of that extra blue space that shows up below the video? This was one of the issues I was running into when trying to work this out myself. 

2. When I rotate my phone the video gets cropped. Is there a way to prevent that?

3. Can we scoot the video down to leave space for the Part Time Evil header?

 

Thanks,

Patrick

password: Party

 

 

 

Link to comment
  • 1 year later...

Create an account or sign in to comment

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

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.