I am working on a website and I have run into a CSS issue. It is using Grid display and currently the contents are overflown and have to scroll to the bottom. I want to to be in the same height as the viewport without any need to scroll. How do I do that? The CSS and component files are as below. I tried using the grid-template-area to see if the components accommodate to the area names but to no avail. Thank you for your time.
Here's how it looks currently and I want all that to accommodate in the viewport and don't have to scroll. https://media.giphy.com/media/U8GRKLQgnUo1J5L9ox/giphy.gif
//App.js
render(){
return (
<div className="App">
<Navbar className="nav"></Navbar>
<MainContent className="content" analysisOnEnd={streamDataStep} analysisData={this.state.data}></MainContent>
</div>
);
}
//App.css
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body, #root, .App{
height: 100%
}
.nav{
grid-area: 'nav';
}
.content{
grid-area: 'content';
}
.App {
background: #1D2730;
/* overflow: hidden; */
display: grid;
height: 100vh;
grid-template-rows: 74px 1fr;
grid-gap: 62px;
grid-template-areas: 'nav'
'content';
}