a DIV with overflow-x: hidden with a child DIVcontent that equals or exceeds the parent size, as long as overflow-y is visible.
Click on the scroll area and drag to the right, It got scrolled!!!
how to avoid it to scrolled if the overflow-y is invisible?????????????
#viewport {
background: blue;
overflow-y: auto;
overflow-x: hidden;
}
#content {
background: yellow;
}
<div id="viewport" style="width: 300px; height: 200px;">
<div id="content" style="height: 300px; width: 300px;">
<div style="height: 100px; width: 100px; background: orange;"></div>
</div>
</div>
Both Firefox and IE do not scroll the content.