How do I display a youtube video on a mobile device in full width.

  • beyondbouldering
    Asked on June 5, 2019 at 2:46 AM

    Hi.  I have a youtube video I would like to play.  I add the IFrame as per https://www.jotform.com/build/91551494268869 and oyu can see it works fine on a Windows browser.  But it does not work on a 10inch android tablet in Chrome - which shows the left and right edges cropped.

    1559717148cropped Screenshot 10

    How can I fix this please so the video is displayed in full width.


    Paul

  • Victoria_K
    Replied on June 5, 2019 at 4:26 AM

    Hello Paul,

    Please inject the following CSS code into Iframe widget:

    iframe {width: 100% !important;}

    Guide: How-to-Inject-CSS-Codes-to-Widgets

    We also have a YouTube widget, just in case you decide to try it for videos:

    How do I display a youtube video on a mobile device in full width Screenshot 20


  • beyondbouldering
    Replied on June 5, 2019 at 8:51 PM

    That works!  Thank you so much.

    Paul