I have an image which i want to display in the same ratio no matter what the screen size is. I want the image to take about 80% of the screen width and then the height should be calculated by itself so the image renders in ratio 4:3. I know there are similar question on Stack-overflow but so far non of them has helped me(especially those padding-top ones). Any help would be really appreciated.
.tile-clients {
margin-top: 0px;
text-align: center;
padding: 0px 0px 0px 0px;
min-height: 400px;
max-height: 400px;
width: 100%;
}
.clients {
background: url("../images/clients.jpg");
background-repeat: no-repeat;
background-size: 100% 100%;
min-width: 400px;
min-height: 300px;
width: 80%;
margin: auto;
}
<section class = "tile-clients">
<h2>Our Clients</h2>
<div class = "clients"></div>
</section>