I am working on a React grid layout with two cards, each in one column. My goal is to make the card on the left fill the entire column height (screen height), and if its content expands, have a scrollbar while keeping the second card intact and aligned to the middle of the screen.
<header className="App-header">
<Container>
<Row>
<Col md={4}>
<Card>some text here</Card>
</Col>
<Col md={8} className="align-self-center">
<Card>some other text here</Card>
</Col>
</Row>
</Container>
</header>
Here is the CSS code snippet:
.App-header {
background-color: #282c34;
min-height: calc(100vh - 59px);
max-height: calc(100vh - 59px);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
}
This is the current UI design: https://i.sstatic.net/3vdmh.png
You can also view the code on CodeSandbox here