I recently started building a website and encountered an issue with resizing the window to fit an iframe
containing a video within a div
. I'm unsure where exactly in the CSS code I need to make adjustments for this. Can someone help me out?
The website is utilizing Bootstrap 4.3.1 and JQuery 3.4.1. I've already attempted setting the width
and height
of the div's
class to 100% and auto, but the video still appears small on the page.
index.html
<div id="resources" class="offset">
<div class="fixed-background">
<div class="row dark text-center">
<div class="col-12">
<h3 class="heading">Sewa dari Tiga Kota Besar di Sumatera</h3>
<div class="heading-underline"></div>
</div>
<div class="col-md-4">
<h3>Medan</h3>
<div class="resource">
<img class="boxshadow" src="images/icon-medan.jpg">
</div>
<a class="btn btn-secondary btn-sm" href="#" target="_blank">Pesan Disini</a>
</div>
<div class="col-md-4">
<h3>Palembang</h3>
<div class="resource">
<img class="boxshadow" src="images/icon-palembang.jpg">
</div>
<a class="btn btn-secondary btn-sm" href="#" target="_blank">Pesan Disini</a>
</div>
<div class="col-md-4">
<h3>Padang</h3>
<div class="resource">
<img class="boxshadow" src="images/icon-padang.jpg">
</div>
<a class="btn btn-secondary btn-sm" href="#" target="_blank">Pesan Disini</a>
</div>
<div class="col-5 mx-auto">
<div class="resource">
<div class="heading-underline"></div>
<!-- 16:9 aspect ratio, THIS IS THE SUITE ONE-->
<div class="embed-responsive embed-responsive-16by9">
<!-- "..?playlist=(embedded-link)&loop=1" is for repeated the same videos that played -->
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/Y-1H27WxaJo?playlist=Y-1H27WxaJo&loop=1" allowfullscreen autoplay></iframe>
</div>
</div>
</div>
</div><!-- End Row Dark -->
<div class="fixed-wrap">
<div class="fixed"><!-- class fixed is where we add the background image -->
</div>
</div>
</div><!-- End Fixed Background -->
</div>
style.css
(Style.css content unchanged from original)I am hoping that modifying the CSS will enable the video content within the iframe
to properly fill the designated div area in the output of index.html
. Currently, the video appears smaller than intended when the window is resized.
You can view the current output image here: https://drive.google.com/file/d/14NmUs8d_9SzLKKsxiUUXFCwzCXmBTyIV/view?usp=sharing