img { display: inline; width: 500px; border: 2px dashed red; background-color: black; vertical-align: top; horizontal-align: center; aspect-ratio: .6/.6 auto; }