robert-o
3/12/2017 - 11:33 PM

How to get div height to auto-adjust to background size? http://stackoverflow.com/questions/600743/how-to-get-div-height-to-auto-adjust-to-b

div {
    background-image: url('image.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: 0;
    padding-top: 66.64%; /* (img-height / img-width * container-width) *//* (853 / 1280 * 100) */
}