I have 2 side-by-side div. If there is any simple solution that allows user to adjust the width of two div by dragging.
If the width of one div increase, the the width of another div decreases, and keep the sum of 2 div width the same.
It would be great if it can be implemented by pure javascript or css. And addding any other items, like div, is welcomed.
The code of 2 divs is as following:
.left {
float: left;
width: 49%;
min-height: 50px;
border: 2px dashed #f0f
}
.right {
float: right;
width: 49%;
min-height: 50px;
border: 2px dashed #00f
}
<div class="right"></div>
<div class="left"></div>
Appreciate any ideas!