#flex-container {
display: flex;
height: 100vh;
flex-direction: column;
}
.header {
flex: 0 1 auto;
order: 1;
}
@media (min-width: 800px) {
#content-meta-wrapper {
flex-wrap: wrap;
flex-direction: row;
}
}
#content-meta-wrapper {
order: 2;
display: flex;
flex: 1 1 auto;
}
@media screen and (max-width: 799px) {
#content-meta-wrapper {
flex-direction: column;
}
}
.footer {
order: 3;
width: 100%;
flex: 0 1 auto;
}
#content {
width: 73%;
flex: 1 1 auto;
order: 1;
overflow: auto;
}
#bookmarks {
display: flex;
align-items: center;
flex-direction: column;
overflow: scroll;
width: 20%;
order: 2;
}
<body>
<div id="flex-container">
<div class="header">menu</div>
<div id="content-meta-wrapper">
<div id="content">
<div>content</div>
<div>content</div>
<div>veeery long content</div>
<div>content</div>
<div>content</div>
<div>veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long conten, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content, veeery long content</div>
</div>
<div id="bookmarks">
<a>bookmark no. 1</a>
<a>bookmark no. 2</a>
<a>bookmark no. 3</a>
</div>
</div>
<div class="footer"> a simple footer </div>
</div>
</body>