Suppose I have a flexible layout and want to make it mutable.
I want to be able to resize one div just by dragging its border horizontally.
Take a look at this fiddle
HTML
#main {
display: flex;
justify-content: space-between;
height: 100vh;
.flex {
width: 100%;
&:nth-child(2) {
background: red;
overflow: auto; resize: horizontal;
}
}
}
<div id="main">
<div class="flex">ABC</div>
<div class="flex">
DEF
</div>
<div class="flex">GHI</div>
</div>
Run codeHide resultHow should I do it?
source
share