I've managed to get the #feature_container to grow to the remaining space of #header but I don't want the feature boxes to also grow (in pink), how can I stop the feature box from stretching as well? My aim is to have the 3 feature boxes sitting in the middle but I want to still be able to control the size of the feature boxes and just keep them in the middle of the remaining space.
Here is an example of what I am trying to do:
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
width: 100%;
margin: 0;
}
#header {
height: 100vh;
height: 100%;
background-color: grey;
}
#fixed_div {
display: inline-block;
}
#feature_header_container {
display: flex;
height: 100%;
background-color: red;
}
#feature_container {
display: inline-flex;
flex-grow: 1;
justify-content: center;
background-color: blue;
color: white;
}
.feature_box {
display: inline-flex;
background-color: pink;
}
<div id="header">
<div id="fixed_div">
<p>Hello World!</p>
</div>
<div id="feature_header_container">
<div id="feature_container">
<div class="feature_box">
<p>Test</p>
</div>
<div class="feature_box">
<p>Test</p>
</div>
<div class="feature_box">
<p>Test</p>
</div>
</div>
</div>
</div>