following is my err code, first "text1" is override
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!--mobile friendly-->
<meta name="viewport" content="width=device-width, user-scalable=yes">
<style>
.it {
display: flex;
flex-direction: column;
width: 100px;
height: 100px
}
.it *:first-child {
flex-grow: 1;
background-color: pink;
}
.it img {
object-fit: contain;
}
</style>
</head>
<body>
<div class="it">
<img src="https://i.stack.imgur.com/rtDch.jpg"/>
<!-- <div>img1</div>-->
<div>text1</div>
</div>
<div class="it">
<img src="https://i.stack.imgur.com/rtDch.jpg"/>
<!-- <div>img2</div>-->
<div>text2</div>
</div>
</body>
</html>
but I expect show img + img name text
I know I can set img height to make text show, but I still wanna find way to make fill flexbox rest space
following is my code img.jpg