I have three boxes in a container. I applied display: flex
, and I set flex-grow: 1;
on children. Everything was fine until I put some text into a child when the box got bigger. How to make the children to remain o a same width even if I put some content into them?
html, body{
width: 100%;
height: 100%;
}
.page-wrapper{
width: 100%;
height: 50%;
display: flex;
}
.column{
height: 100%;
border: 1px solid red;
flex-grow: 1;
margin: 20px 10px;
}
<!DOCTYPE html>
<html>
<header>
<link rel="stylesheet" href="main.css">
</header>
<body>
<div class="page-wrapper">
<div class="column">
<h1>Hello World</h1>
</div>
<div class="column"></div>
<div class="column"></div>
</div>
<div class="img"></div>
</body>
</html>