I have a 48x48 div and inside it there is an img element, I want to fit it into the div without losing any part, in the mean time the ratio is kept, is it achievable using h
I was having a lot of problems to get this working, every single solution I found didn't seem to work.
I realized that I had to set the div display to flex, so basically this is my CSS:
div{ display: flex; } div img{ max-height: 100%; max-width: 100%; }