I've seen several examples of using max-width: 100%;
and height: auto;
but these are not working. I am trying to place an image within a section
in bootstrap 4. The image is either disproportioned, too big, and does not change when the page width changes.
Note that my image is 1800px * 900px and I am trying to make the width of the banner to be the page width and the height to adjust accordingly.
HTML
<!-- Image Section -->
<section class="banner-cube">
<div class="container">
<br>
<div>
<h3>Image Banner</h3>
</div>
<br>
</div>
</section>
CSS
.banner-cube {
background: url("../imagery/cubebanner.png");
max-width: 100%;
height: auto;
background-position: center;
background-repeat: no-repeat;
}