GitHub 6740★

Have you seen CSS Scan?

The fastest and easiest way to check, copy and edit CSS.

Learn more →

CSS Scan logo

Sidebar

HTML

<div class="sidebar">
<!-- Sidebar -->
<aside class="sidebar__sidebar">
...
</aside>

<!-- Main -->
<main class="sidebar__main">
...
</main>
</div>

CSS

.sidebar {
display: flex;
}

.sidebar__sidebar {
width: 30%;
}

.sidebar__main {
/* Take the remaining width */
flex: 1;

/* Make it scrollable */
overflow: auto;
}
Demo
Follow me on and to get more useful contents.