As you can see in the image below, I have a red div at the size of the "screen", what I want to is to make content scrollable in that area only. Is there a way to do that?
The whole pad's css:
#mainWindow{
margin-left:auto;
margin-right:auto;
background-image:url("../images/mainWindow.png");
background-size:100% 100%;
height:100%;
width:80%;
padding:55px 60px 95px 65px;
box-sizing:border-box;
position: relative;
}
Screen's css:
#screen{
border:1px solid red;
width:100%;
height:100%;
}
The CSS tag you're looking for is 'overflow'
Set the overflow property of that div.
Try adding
overflow-y: scroll
to your#mainWindow
CSS declaration.(Or alternatively to your
#screen
CSS declaration.)...might do the trick. If you need the parent element to not scroll, you could maybe set it like: