#container { display: flex; min-height: 100vh; flex-direction: column; } #main-content { flex: 1; }
<div id="container"> <Header loaded={loaded} /> <div id="main-content"> <Switch> <Route path="/about" render={props => <About loaded={loaded} {...props} />} /> <Route exact path="/" render={props => <MainPage loaded={loaded} {...props} />} /> <Redirect to="/" /> </Switch> </div> <Footer /> </div>