The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Custom behaviour on image ratio Reply To: Custom behaviour on image ratio


Check this codenpen. I added 2 ways of handling images, inline and as background.
You can change the values of fitting the images with the dropdowns.

Also on load there is a check whether the image is portrait or landscape. So if you want to go that way, it should also be possible.