Title: Youtube resizing issue on iframe code
Last modified: June 3, 2021

---

# Youtube resizing issue on iframe code

 *  [robmcp](https://wordpress.org/support/users/robmcp/)
 * (@robmcp)
 * [5 years ago](https://wordpress.org/support/topic/youtube-resizing-issue-on-iframe-code/)
 * General question.
    I am using/testing the Youtube iframe share code `<iframe 
   src="https://www.youtube.com/embed/SDFASDF"£" width="600px" height="450px" frameborder
   ="0" allowfullscreen="allowfullscreen"></iframe>` Does any user know why the 
   width and height settings would be ignored. The video shows on pages at a smaller
   size, then jumps up to around 1000 x 760 px. Surely the iframe width/height holds
   sway? It looks like something on the site changes this, it’s a general question
   as this happens to me with ANY Youtube generated ifram width/heights
    -  This topic was modified 5 years ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
    -  This topic was modified 5 years ago by [robmcp](https://wordpress.org/support/users/robmcp/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [adinugroho](https://wordpress.org/support/users/adinugroho/)
 * (@adinugroho)
 * [5 years ago](https://wordpress.org/support/topic/youtube-resizing-issue-on-iframe-code/#post-14516848)
 * Hi robmcp,
 * You can try to add CSS width attribute.
 *     ```
       <iframe style="width: 100% !important" src="https://www.youtube.com/embed/SDFASDF"£" width="600px" height="450px" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
       ```
   
 * Let me know if it works for you.
 * Regards,
    Adi
 *  Thread Starter [robmcp](https://wordpress.org/support/users/robmcp/)
 * (@robmcp)
 * [5 years ago](https://wordpress.org/support/topic/youtube-resizing-issue-on-iframe-code/#post-14516997)
 * Thanks, but no luck with that, settings below tested and result explained.
 * `<iframe style="width: 100% !important" title="YouTube video player" src="https://
   www.youtube.com/embed/peLH-HNza44" width="60" height="15" frameborder="0" allowfullscreen
   ="allowfullscreen"></iframe>`
 * this tried as a desperate measure the iframe does not show at 60×15 for more 
   than 1/2 second.
 * I don’t actually want a video that small, I DO want the iframe to obey the width/
   height settings specified and can’t pin down why it ignores them.
 *  [adinugroho](https://wordpress.org/support/users/adinugroho/)
 * (@adinugroho)
 * [5 years ago](https://wordpress.org/support/topic/youtube-resizing-issue-on-iframe-code/#post-14517185)
 * Hi robmcp,
 * Thank you for the update. Can you share your website page URL?
 * Regards,
    Adi
 *  Thread Starter [robmcp](https://wordpress.org/support/users/robmcp/)
 * (@robmcp)
 * [5 years ago](https://wordpress.org/support/topic/youtube-resizing-issue-on-iframe-code/#post-14517465)
 * UPDATE.
    Looks like I have traced this to a theme issue, may look for another
   fix but theme devs say update/fix imminent.
 *  Thread Starter [robmcp](https://wordpress.org/support/users/robmcp/)
 * (@robmcp)
 * [5 years ago](https://wordpress.org/support/topic/youtube-resizing-issue-on-iframe-code/#post-14520874)
 * [http://www.phattso.co.uk/landing-page/](http://www.phattso.co.uk/landing-page/)
   
   Test site the theme devs say there will be a fix out soon. I’ve tried some variations
   on size settings made no difference.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Youtube resizing issue on iframe code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [robmcp](https://wordpress.org/support/users/robmcp/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/youtube-resizing-issue-on-iframe-code/#post-14520874)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
