Skip to content

Instantly share code, notes, and snippets.

@uyriq
Created June 23, 2022 18:06
Show Gist options
  • Save uyriq/880f0b2d54829403d876e8b00a7e7d12 to your computer and use it in GitHub Desktop.
Save uyriq/880f0b2d54829403d876e8b00a7e7d12 to your computer and use it in GitHub Desktop.
ul-li-list-scroll
<div class="full-screen">
<div class="header">Header</div>
<div class="main">
<div class="left">Menu-stuff here. No way this will fit.
<ul>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
<li>Menu Entry</li>
</ul>
</div>
<div class="middle">Large stuff here</div>
<div class="right">Another sidebar</div>
</div>
<div class="footer">Footer </div>
</div>
.flex-container {
display: flex;
overflow: hidden;
}
.flex-container > * {
flex: 0 0 auto;
overflow: scroll;
}
.stretchy {
flex: 1 1 auto;
}
.column {
flex-direction: column;
}
html,
body,
.full-screen {
height: 100%;
}
body {
margin: 0;
}
.full-screen {
display: flex;
overflow: hidden;
flex-direction: column;
}
.full-screen > * {
flex: 0 0 auto;
overflow: scroll;
}
.full-screen > .header,
.full-screen > .footer {
height: 50px;
background: #555;
color: white;
}
.full-screen > .main {
flex: 1 1 auto;
display: flex;
overflow: hidden;
}
.full-screen > .main > * {
flex: 0 0 auto;
overflow: scroll;
}
.full-screen > .main > .left,
.full-screen > .main > .right {
width: 200px;
background: #eee;
}
.full-screen > .main > .middle {
flex: 1 1 auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment