I am using react-flexbox-grid from https://github.com/roylee0704/react-flexbox-grid, while it allows me to specify the column sizes I am not able to fill my whole page.
I want the Holy-Grail layout as seen here:
Asked
Active
Viewed 2,405 times
1

optional
- 2,504
- 4
- 18
- 30
1 Answers
2
You can do this with plain ol' flexbox. You probably just want a container with min-height: 100vh;
<div class="container">
<div class="header"></div>
<div class="content">
<div class="left"></div>
<div class="center"></div>
<div class="right"></div>
</div>
<div class="footer"></div>
</div>
With the following CSS:
.container {
display: flex;
min-height: 100vh;
flex-direction: column;
}
.header, .footer {
height: 76px;
}
.left, .right {
width: 76px;
}
.content, .center {
flex: 1;
}
.content {
display: flex;
}

corvid
- 10,733
- 11
- 61
- 130
-
It doesn't work for me, is it because I am using 'position: absolute;' for my body of the html in my .css file? – optional May 04 '17 at 21:11
-
I had to add min-{width,height}: 100% to the container ;) – optional May 04 '17 at 21:46