YouTube videos fully expand in Wordpress despite custom pixel size ?

by Joe23
2 replies
Hello,



Here are all the details of my problem...

- I have the current Wordpress 3.9.1. stable release

- I grab the standard "embed" code from YouTube

- In the YouTube embed field provided I enter the custom size I want, 550x309

- When I add that code into my main content area (which is around 660 pixels wide) the video fully expands to 660 pixels instead of the custom size I want 550x309

Here is YouTube embed code I grabbed from a random video on YouTube. This is the code I use on my website:
Code:
<iframe width="550" height="309" src="//www.youtube.com/embed/XyX9-068Xx0?rel=0" frameborder="0" allowfullscreen></iframe>
Any suggestions?
#custom #expand #fully #pixel #size #videos #wordpress #youtube
  • Profile picture of the author LarryKeenan
    HTML Code:
     <center><div style="width:550px;height:309px;"><iframe width="550" height="309" src="http://www.youtube.com/embed/3s2OqkQYLnw?rel=0" frameborder="0" allowfullscreen></iframe></div></center>
    {{ DiscussionBoard.errors[9290991].message }}
    • Profile picture of the author Joe23
      That messes with my custom theme css. But I definitely can work with the code. That broke a huge roadblock for me.

      Thanks a ton!
      {{ DiscussionBoard.errors[9291303].message }}

Trending Topics