skip to Main Content

CSS – Image behaves differently than div

.d1 { border: 1px solid black; display: flex; width: 300px; height: 300px; } <div class="d1"> <img src="https://www.gravatar.com/avatar/4581a99fa5793feaeff38d989a1524c6?s=48&d=identicon&r=PG"> </div> Why does an images also stretch to the very end of a flexbox's width? Shouldn't it only stretch towards the very bottom,…

VIEW QUESTION
Back To Top
Search