Support » Fixing WordPress » Making embed videos responsive

  • We have several videos on our website that are hosted with Vimeo, however, none of them are responsive for tablets and smart phones. I was told by one of the staff members at Vimeo that they don’t provide responsive embed code, but that several of their users have expressed the same and found success by using Javascript.

    I found this when doing a search (, but I’m not exactly sure how to make it work with my WordPress pages. Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Or would this be a better option?

    Hi Drew,

    When implementing and embedding YouTube videos into sites I have developed for clients, I have gone with the FitVids.js javascript library. Very simple to implement and begin using, and its widely supported. Check it out and have a look at some of the base code:

    If your trying to stay away from enqueueing another javascript library, you can achieve this with pure CSS using a method like this:


    <div class="js-video [vimeo, widescreen]">
      <iframe width="560" height="315" src="" frameborder="0" allowfullscreen></iframe>


    .js-video {
      height: 0;
      padding-top: 25px;
      padding-bottom: 67.5%;
      margin-bottom: 10px;
      position: relative;
      overflow: hidden;
    .js-video.widescreen {
      padding-bottom: 57.25%;
    .js-video.vimeo {
      padding-top: 0;

    I hope this helps!


    Sorry I neglected to include a reference for this post. If you want to read up further, I pulled this information from:


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Making embed videos responsive’ is closed to new replies.