Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Plint

Embedded Responsive Youtube Video Sizing issues

Question

I am embedding youtube video playlists onto my website. They are stacked on top of each other. I added some code to make them responsive in mobile and that worked fine. However, on mobile each successive playlist as you go down appears smaller than the one before it. If I reorganize the order of the playlists they change sizes always so that they get smaller as they go down the page. I used the same embed code for all of them just replacing the video source and based on my limited understanding of embed code I feel like the playlists should all be the same size since they are all given the same parameters to interact with the same "container." The code I used is below. I also included a screenshot of the issue on mobile. Can anyone help?

<div class="iframe-container"> <style>
.iframe-container{
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; 
  height: 0;
}
.iframe-container iframe{
  position: absolute;
  top:0;
  left: 0;
  width: 100%;
  height: 100%;
}
</style> <iframe width="560" height="315" src="videowebaddress" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

IMG_0305.jpg

Share this post


Link to post

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...