Support » Plugins and Hacks » Youtube / iframe sizes being ignored

  • I am using the latest version of WordPress with the “Hatch” theme.

    I have tried the following:

    youtube embed code with size and height (iframe and flash)

    changing the embed size for media in the settings page

    plugins like: Smart Youtube Pro and Artiss Youtube embed

    jetpack shortcode

    Every single time, despite defining a size of 640×360, the videos appear 940×520, the full width of the page content area.

    Please help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ok I resolved the issue but I’m not sure why this was interfering.

    I realized that since the videos were capping at 940px (100% of the content area width) it had to be something in the theme.

    I opened up the theme editor, hit ‘ctrl-f’ to find a mention of iframe and found this:

    .hentry img, .entry-content iframe, .entry-content object, .entry-content video, .entry-content embed { max-width: 100%}

    so I changed the max width and height to this:

    max-width: 640px; max-height: 360px

    Now it works. Hope this helps someone.

    how did you add on editor?

    Hi, I ran into the same problem. I presume the max-width:100% style is there to ensure the responsiveness of the theme on various platforms.
    So changing it may ruin an important characteristic.

    I tried a very simple thing: a hardcode style on the iframe and it worked. Also the video stays responsive.

    <iframe style=”width: 560px; height: 315px;” src=”http://www.youtube.com/embed/kc7ShlmEKVg?rel=0″ allowfullscreen=”” frameborder=”0″></iframe>

    Here’s the page: http://www.grafsteeninmozaiek.nl/monument-in-mozaiek/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Youtube / iframe sizes being ignored’ is closed to new replies.