I am facing an issue where the child div remains fixed in size, even when the parent div is smaller. I need the child div to stay within the parent div and show scrollbars when necessary. Check out the example here
Here is the HTML:
<div id="parent">
<div id="child"></div>
</div>
And here is the CSS:
.child{
width: 500px;
height: 400px;
background-color: green;
}
.parent{
height: 100%;
width: 100%;
background-color: red;
padding: 50px;
width: auto;
}