I have a question which is pretty hard to explain, but I will try. I have a parent div, which is the size of the screen and I have child div which is bigger than the size of the screen, I need to make child div draggable, but in the boundaries of parent div. I hope you will understand what I mean :D Example Example2
function mainMenu() {
var base =
'<div id="notmovingdiv">'+
'<div id="movingdiv">'</div>'+
'</div>';
$("#main_container").html(base);
}
#notmovingdiv::-webkit-scrollbar{
display:none;
}
#notmovingdiv {
overflow: auto;
width:100vw;
height:100vh;
left:0px;
top:0px;
position:absolute;
cursor: default;
display: flex;
align-items: center;
justify-content: center;
}
#movingdiv {
width:400vw;
height:400vh;
position:absolute;
cursor: default;
display: flex;
align-items: center;
justify-content: center;
}
<body>
<div class="full-screen">
<div id="main_container">
</div>
</body>