Reputation: 1686
When i am applied padding:10px to the child div which have the height 100% and parent height 200px, when the content exceeded 200px of the height the scroll bar bottom is going outside. If i removes the padding its coming fine. How can we solve the problem without remove padding and adding inside the div?
Upvotes: 0
Views: 462
Reputation: 12190
Give overflow:auto;
to .wrapper
.wrapper{height:200px;width:300px; overflow:auto; border:1px solid red;margin:10px}
.innerDiv{height:100%;padding:10px}
Demo: http://jsfiddle.net/H2d77/4/
Upvotes: 3