How can I center an iframe on a Page in the Dawn theme?

I have created a Page on which I have 2 YouTube videos (in an iFrame). The video is aligned fully left. I would like to have them centered. Theme Dawn. Thanks for helping.

https://d1m4oo3bconoe383-57116262589.shopifypreview.com

Hey @jeroenvandepol ,

there are no videos in the URL you provided, please reply with the right URL so we can provide support :grinning_face:

Sorry. My current website (lottta.nl) is made with the theme Debut. I am now working on a new version of the website that is not live yet (theme Dawn). The issue I have is on a Page (https://lottta.nl/pages/floral-lab), so I didn’t know what to share.

The Page is

Great!

You can use the following code:


  

    <iframe width="367" height="652" src="https://www.youtube.com/embed/zy1aibKfERU" title="How to use Floral Lab vaas" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>
  

  
    <iframe title="Making of Floral Lab" src="https://www.youtube.com/embed/y_seLZm_f2Q" height="652" width="367" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" frameborder="0"></iframe>
  

and for the styling:


Result:

Please let us know if you need any further help!

Wow, that’s quick. Thanks. It’s also nice that you have built in the option to adjust the width. Super. Great.
I think we are almost there. See image below, the aspect ratio of the video is not right. How can I restore that?

You can play with the width parameter of the iframe and in the CSS code

Yes, I had seen that. But the height is not correct. The aspect ratio of the video is not correct.

The aspect ratio of a YouTube short is 9:16 so any number that is dividable by this aspect ratio will work

Sorry for not making myself clear. Please have a look at the screendump below. The aspect ratio of video “player” is odd. I would like the video “player” to be higher.

Oke, I have been playing with the percentages in the Style code. Changed the height (of the iFrame) from “auto” to 250%. Maybe not the correct way, but it will do.