Adjust embedded content size in Full Width Template


#1

Hi! I’m loving the themes and just purchased west pro. I’m trying to embed a youtube video in a page with a full width template. It seems to be stretching the embedded width and height to full page. Is there a way to override or change this so I can decide the values of the embedded content?

<iframe src=“https://www.youtube-nocookie.com/embed/b--NaEb-DTc?rel=0&controls=0&showinfo=0” width=“420” height=“315” frameborder=“0” allowfullscreen=“allowfullscreen”></iframe>

The address is www.jkbass.net/lessons

Thanks in advance for your help!

Best,
jeff


#2

Hi Jeff,

As default, the width of the video is stretched when you set the page attribute as full width.

But, you can modify the width and height of the video using css style element directly. Here is the example:

<iframe style=“width: 420px; height: 351px;” src=“https://www.youtube-nocookie.com/embed/b–NaEb-DTc?rel=0&controls=0&showinfo=0” frameborder=0" allowfullscreen=“allowfullscreen”></iframe>


#3

Thank you so much. That is works great. However, now the video is only aligned left instead of center… This is what I have:

<center>
<iframe style=“width: 600px; height: 400px;” src=“https://www.youtube-nocookie.com/embed/b--NaEb-DTc?rel=0&controls=0&showinfo=0” frameborder=“0” allowfullscreen=“allowfullscreen”></iframe>
</center>

Here is the current page: http://jkbass.net/lessons

Thank you again for your help and quick response!

Best,
Jeff


#4

Hello Jeff,

You can also make your video responsive by following this guide:

But in this case you have to create a child theme. That’s not an easy way, but it worth it :slight_smile:

Best Regards, Roman.