Pavan Kumar
Pavan Kumar

Reputation: 1686

scroll bar going out at the bottom from the parent div

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?

http://jsfiddle.net/H2d77/

Upvotes: 0

Views: 462

Answers (1)

Dipak
Dipak

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

Related Questions