Jump to content

Resize Video Block Ratio for Mobile View

Recommended Posts

Hello. I have added a video to my client's homepage and the current ratio is 16:9 (which is fine for desktop) but for mobile, the 16:9 ratio is too small for a optimized and responsive design.

For mobile, I would like the video block in the individual section to be a different ratio from desktop and ensure the video content fills/stretches to the new video block ratio.

Can I get any help with this?

image.thumb.png.b057fff7beea1f4bb455a8b684ed53fd.png

Link to comment
  • Replies 5
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 2 weeks later...
On 1/6/2024 at 2:04 PM, BLS said:

Hi there. Link is ashleycbattle.com 

Password: preview

Use this code to Website Tools (under Not Linked) > Custom CSS

@media screen and (max-width:767px) {
div#block-yui_3_17_2_1_1702838154093_6896 {
.native-video-player.video-player {
    padding-bottom: 120% !important;
}
.video-player .plyr video {
    object-fit: cover !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
  • 3 months later...
On 5/9/2024 at 12:37 PM, Emski said:

Hi @tuanphan

I have a similar issue, that my landscape video is too small to be viewed on mobile.

The url is murall.au

It would be amazing if you could help me out. I have tried a couple of different things none working.

Thanks

Screenshot 2024-05-09 at 3.36.40 PM.png

You can use this code to Website > Website Tools > Custom CSS

@media screen and (max-width:767px) {
div#block-0e9f858f204e05273e64 .video-player {
    padding-top: 90% !important;
}
div#block-0e9f858f204e05273e64 video {
    object-fit: cover !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

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.