New Shopify Certification now available: Liquid Storefronts for Theme Developers

Resizing A Facebook Embedded Video For Desktop

cc20231
Visitor
2 0 0

Hello, I am trying to resize this FB embedded video for desktop because it is filling the entire screen. It look perfect on mobile but I'm running into issues resizing the video for desktop without affecting mobile view. Below is site link and the code I'm using.

 

https://associated-hardwoods-inc.myshopify.com/pages/florida-distribution

 

<div style="position: relative; width: 100%; padding-top: 56.25%;">
<iframe src="https://www.facebook.com/plugins/video.php?height=314&href=https%3A%2F%2Fwww.facebook.com%2Fassociat..." style="border:none;overflow:hidden; width:100%; height:100%; position:absolute; top: 0; left: 0;" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share" allowFullScreen="true"></iframe>
</div>

Reply 1 (1)
Natasha-Saed
Shopify Partner
303 32 55

Hi,

 

You are setting the height to 100% and the width to 100% so it will fill the entire screen , fix the width to 90% and for the left make it 5% it will look perfect

<div style="position: relative; width: 100%; padding-top: 56.25%;">
<iframe src="https://www.facebook.com/plugins/video.php?height=314&href=https%3A%2F%2Fwww.facebook.com%2Fassociat..." style="border:none;overflow:hidden; width:90%; height:100%; position:absolute; top: 0; left: 5%;" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share" allowFullScreen="true"></iframe>
</div>

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint