Question and answer is powered by AnsPress.io
Image as a background image with
background-size: contain.
div {width: 300px; max-width: 100%;} div > div { width: 100%; padding-bottom: 60%; /* use this for the aspect ratio */ background: black url('https://image.ibb.co/eUVdDR/bg12.jpg') center center no-repeat; background-size: contain; }