Making Vimeo videos responsive for mobile
-
I noticed that Vimeo video embeds are not responsive. They look fine on a desktop monitor but on a tablet or phone they do not shrink down, the video extends off to the right side. I saw another post here (now closed) that suggested wrapping the video iframe in this code:
<div class="embed-responsive embed-responsive-16by9"> <iframe src="https://openload.co/embed/60H9sHz72N8/" scrolling="no" frameborder="0" width="720" height="480" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe> </div>
However, I was wondering if there is an easier way to do this, like adding CSS or PHP code once somewhere so that it performs the effect globally on every video. I already have a bunch of Vimeo videos and it would be a pain to add the new code to each post, and also to add it to every future post.
By the way, YouTube videos appear to be resizing OK. Only Vimeo videos are giving me this problem. I don’t have a site online you can check right now to see this but if you try adding a Vimeo video to your own .Tube site you might see the problem.
Thanks!
- The topic ‘Making Vimeo videos responsive for mobile’ is closed to new replies.