• 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 3 years, 9 months ago by Jan Dembowski.
    • This topic was modified 3 years, 9 months ago by robmcp.
Viewing 5 replies - 1 through 5 (of 5 total)
  • 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

    (@robmcp)

    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.

    Hi robmcp,

    Thank you for the update. Can you share your website page URL?

    Regards,
    Adi

    Thread Starter robmcp

    (@robmcp)

    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

    (@robmcp)

    https://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.