![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
![3M-Commercial Tape Div 3121256 33NRR Ear Soft Super Fit Single-Use Earplugs, Cordless - Yellow & Red: Hardhats: Amazon.com: Industrial & Scientific 3M-Commercial Tape Div 3121256 33NRR Ear Soft Super Fit Single-Use Earplugs, Cordless - Yellow & Red: Hardhats: Amazon.com: Industrial & Scientific](https://m.media-amazon.com/images/I/71Hka3Fg5DL._AC_UF1000,1000_QL80_.jpg)
3M-Commercial Tape Div 3121256 33NRR Ear Soft Super Fit Single-Use Earplugs, Cordless - Yellow & Red: Hardhats: Amazon.com: Industrial & Scientific
![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)
Help, img doesn't auto fit in div container on certain width - HTML & CSS - SitePoint Forums | Web Development & Design Community
![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
![How to fit an iframe in a div element | iframe with custom width | custom iframe container - YouTube How to fit an iframe in a div element | iframe with custom width | custom iframe container - YouTube](https://i.ytimg.com/vi/voXlG_U3sVc/maxresdefault.jpg)