Size in you tub embed code

Hello, i am used to use this kind of embed code for my video [embed width=“450” height=“456”]https://www.youtube.com/watch?v=PjotIHWqWGo[/embed]

I see it does not function in a text element. If i use the video element it will work, but it does not maintain the restricted size. Also if i use the you tube embed code, still the video displays way to big. How can i control the size of the video?

Thanks!

Hi RPronk,

Please try with the iframe embed code instead, then you can change the height and width of iframe:

<iframe width="560" height="315" src="https://www.youtube.com/embed/PjotIHWqWGo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

You can it under Share button below the video:

Hope it helps :slight_smile:

Hello, thank you. But i have tried this method already and still the video stays to large. This is an example page:

https://jittysamsterdam.com/russische-kapper-amsterdam/

Thanks!

Hi @RPronk,

The video element has size feature,

You can either select Aspect Ratio option or Fixed Height option. I recommend the Aspect ratio, just change the max width and the height will follow accordingly.

Thanks!

i am sorry i have not seen these options. However, they do not work nice for me. If i downsize aspect ratio it works fine on desktop, but shows way to small on mobile. I could hide element on mobile and use different settings on mobile but this will be al lot of effort for the whole site. In my olde site i just had e a fixed with of 550px which works fine but mobile and desktop.

I hope there is a solution for this,
Thanks

Hello @RPronk,

With the video element, please set the width to 100% and a maximum width of 550px. And to display it in the center, you must set the left and right margin to auto.

Hope this helps.

1 Like

Perfect! Thank you

Have a great day

You’re welcome! :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.