CSS scale down image to fit in containing div, without specifing original size
You can use a background image to accomplish this; From MDN – Background Size: Contain: This keyword specifies that the background image should be scaled to be as large as possible while ensuring both its dimensions are less than or equal to the corresponding dimensions of the background positioning area. Demo CSS: #im { position: … Read more