Is there a way to create a two column layout with a locked (sticky? fixed?) left menu that stays in place as you scroll through the content on the right side?
Additionally, I believe I will need to use JavaScript (without jQuery) to make the columns resizable. While using CSS for 'cursor: col-resize' seems straightforward, I have no idea how to approach this in JS.
.row {
display: flex;
}
.column {
flex: 50%;
padding: 16px;
}
.one {
background-color: tomato;
min-height: 100%;
}
.two {
background-color: #33a8ff;
height: 5000px;
}
html,
body {
height: 100%;
margin: 0;
}
<div class="row">
<div class="column one">
<h2> column #1 </h2>
<p>menu items</p>
</div>
<div class="column two">
<h2>column #2</h2>
<p> Some contents in column 2 </p>
</div>
</div>
You can access an example on jsFiddle here:
https://jsfiddle.net/ojx1g64s/