Setting embedded youtube videos to fill the screen on any resolution with media queries?
I would like to thank everyone for their continued help with this code. I think this is probably the last problem that I have been running into with the website. Thank you for all of your help.
I'm trying to make an embedded YouTube video stretch to fill all available width (and not stretch the page out) of a page on any resolution. Just like the adaptive pictures on my website. I already know how to use media queries, and the goal is to set the video to become completely adaptive on resolutions lower than 1000px. I'm using this for most of the elements on my website and I have been trying to use the same code for my video, but it's not working for some reason.
This is my page.
The video is toward the bottom of the page. Right now on small screens the video stretches completely out of the screen. I also don't have any styles applied anywhere for the video's div class, but I did try using the width:100% attribute, but to no avail.
this is the code for the embedded video...
<div class="videos">
<iframe width="1920" height="1080" src="https://www.youtube.com/embed/zIP2iVV6vOU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
I am aware that it is set to 1920, 1080, but I thought (like with the pictures on my website) I could style it differently with a media query?
Is there anything I could do to achieve the intended results?
Thank you again. I really appreciate all of this.
Message was edited by: Mod. (Link Removed)
