![Simple CSS Solutions: How to fit images with different dimensions in set containers | by Kimberly Luu | Medium Simple CSS Solutions: How to fit images with different dimensions in set containers | by Kimberly Luu | Medium](http://jonathannicol.com/cms/wp-content/uploads/2014/06/cropped-thumbnails.png)
Simple CSS Solutions: How to fit images with different dimensions in set containers | by Kimberly Luu | Medium
![html - Fit Image in DIV as a background which contains height less than division (Different) - Stack Overflow html - Fit Image in DIV as a background which contains height less than division (Different) - Stack Overflow](https://i.stack.imgur.com/g63cF.png)
html - Fit Image in DIV as a background which contains height less than division (Different) - Stack Overflow
![So I want the parent div to have enough height to fit the child div(as shown in the snapshot). Worthy to not I used position: relative and edited the child div's positions So I want the parent div to have enough height to fit the child div(as shown in the snapshot). Worthy to not I used position: relative and edited the child div's positions](https://i.redd.it/qbvo5ae362i91.png)
So I want the parent div to have enough height to fit the child div(as shown in the snapshot). Worthy to not I used position: relative and edited the child div's positions
![html - Fit Image in DIV as a background which contains height less than division (Different) - Stack Overflow html - Fit Image in DIV as a background which contains height less than division (Different) - Stack Overflow](https://i.stack.imgur.com/hfBzq.png)
html - Fit Image in DIV as a background which contains height less than division (Different) - Stack Overflow
![Fit Div™ Wrist Support Band with Thumb Loop for Gym, Cross-Fit, Weight Lifting, Power Lifting,Push-Up. Calisthenics for Men & Women : Amazon.in: Sports, Fitness & Outdoors Fit Div™ Wrist Support Band with Thumb Loop for Gym, Cross-Fit, Weight Lifting, Power Lifting,Push-Up. Calisthenics for Men & Women : Amazon.in: Sports, Fitness & Outdoors](https://m.media-amazon.com/images/W/IMAGERENDERING_521856-T1/images/I/71IazXuagcL._SY550_.jpg)
Fit Div™ Wrist Support Band with Thumb Loop for Gym, Cross-Fit, Weight Lifting, Power Lifting,Push-Up. Calisthenics for Men & Women : Amazon.in: Sports, Fitness & Outdoors
![html - Stretch half an image to fit in a div and half overflow in mobile and half image display in half portion of div in desktop? - Stack Overflow html - Stretch half an image to fit in a div and half overflow in mobile and half image display in half portion of div in desktop? - Stack Overflow](https://i.stack.imgur.com/cJBS2.png)
html - Stretch half an image to fit in a div and half overflow in mobile and half image display in half portion of div in desktop? - Stack Overflow
![Help, img doesn't auto fit in div container on certain width - HTML & CSS - SitePoint Forums | Web Development & Design Community Help, img doesn't auto fit in div container on certain width - HTML & CSS - SitePoint Forums | Web Development & Design Community](https://global.discourse-cdn.com/sitepoint/original/3X/e/3/e32075225c6b9699afa000b62f8f62a5375370dc.jpeg)