Have a look at the Codepen.io sample
How can I adjust the height of the "menu-parent" to match height of the "content-parent"?
Why does this layout in Edge and Firefox not match the layout of Chrome?
I'm using:
- Windows 1703 (Redstone 2) with EdgeHTML 15.
- Chrome 64.0
- Firefox 58.0.2
These are current browser versions, so I guess I don't have to use any prefixes for flexbox. Note: info-bar has to be nested into main. Can't use any JavaScript, so HTML & CSS only.
html {
height: 100%;
}
body {
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
.wrapper {
background-color: rgb(255, 177, 169);
border: 5px solid salmon;
display: flex;
flex-direction: column;
height: 100%;
}
.header {
background-color: rgb(255, 238, 141);
border: 5px solid gold;
height: 144px;
width: 100%;
}
.main {
background-color: rgb(71, 71, 255);
border: 5px solid blue;
display: inherit;
flex-direction: column;
}
.footer {
background-color: rgb(255, 124, 76);
border: 5px solid orangered;
height: 100px;
}
.info-bar {
background-color: rgb(191, 232, 245);
border: 5px solid lightblue;
display: inherit;
height: 64px;
width: 100%;
}
.content-and-menu-wrapper {
background-color: rgb(36, 199, 191);
border: 5px solid lightseagreen;
display: flex;
flex-direction: row;
overflow-y: scroll;
flex: 1;
}
.menu-parent {
background-color: rgb(165, 220, 255);
border: 5px solid lightskyblue;
flex-wrap: wrap;
min-height: 100%;
width: 275px;
}
.content-parent {
background-color: rgb(198, 210, 226);
border: 5px solid lightsteelblue;
flex-wrap: wrap;
height: 100%;
width: 100%;
}
.menu-item {
border: 1px solid black;
height: 100%;
width: 100%;
}
.content-item {
border: 1px solid black;
height: 1000px;
width: 100%;
}
.spacer {
box-sizing: border-box;
margin: 0px;
}
<div class="wrapper spacer">
<div class="header spacer">header</div>
<div class="main spacer">
<div class="info-bar spacer">info-bar</div>
<div class="content-and-menu-wrapper spacer">
<div class="menu-parent spacer">menu-parent
<div class="menu-item spacer">menu-item</div>
</div>
<div class="content-parent spacer">content-parent
<div class="content-item spacer">content-item</div>
</div>
</div>
</div>
<div class="footer spacer">footer</div>
</div>