Open mhulse opened 6 years ago
/* <div class="ap_epic"></div> */ .ap_epic { background: url(../images/epic.png) no-repeat center top; /* image = 1920 x 1280 */ background-size: contain; display: block; padding-bottom: 66.666666666667%; /* (image height = 1280) / (image width = 1920) * 100 */ }
Decent example/explanation found here: https://www.milessebesta.com/web-design/scaling-div-height-proportional-to-width-trick/
Decent example/explanation found here: https://www.milessebesta.com/web-design/scaling-div-height-proportional-to-width-trick/