How can I make an element not contribute to its parent div's scrolling?

Viewed 23

Is there some way I can prevent a child div from contributing to its parent div's scrolling? I want the parent div to scroll on overflow, but there is only one child element I don't want that to apply to.

<div style="height:200px; overflow-y:scroll;">
    <div style="height:900px;" /> // don't cause parent to scroll on overflow
</div>

I basically want the overflow-y:hidden; functionality, but only for a certain child element.

0 Answers
Related