Flexbox large items
by kmouse
HTML
<div class="container">
<div class="content-box">
<div class="a">Title</div>
<div class="b"></div>
<div class="c"></div>
<div class="d">Some text contents</div>
</div>
</div>
CSS
body {
background-color: black;
width: 100%;
height: 100%;
color: white;
display: flex;
align-items: center;
justify-content: center;
}
div.container {
width: 1280px;
height: 720px;
background-color: #1f001f;
display: flex;
flex-direction: column;
align-items: center;
}
.d {
background-color: #003f3f;
height: 480px;
overflow-y: scroll;
}
.content-box {
border: 1px solid white;
box-sizing: border-box;
padding: 32px 20px;
flex-grow: 1;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.content-box > * {
/*flex-shrink: 0;*/
}
.a {
border: 1px solid red;
font-size: 24px;
font-weight: bold;
}
.b {
border: 1px solid red;
width: 774px;
height: 50px;
}
.c {
border: 1px solid red;
width: 600px;
height: 450px;
}