<!DOCTYPE html> <p>Test decreasing the height of the containing block of a scrollable container with percent height.</p> <p>One horizontal scrollbar should be seen below.</p> <div id="target" style="height:450px;"> <div style="height:50%; overflow-x:scroll;"></div> </div> <script src="../../resources/run-after-layout-and-paint.js"></script> <script> function changeSize() { document.getElementById('target').style.height = '250px'; } runAfterLayoutAndPaint(changeSize, true); </script>