overflow-x and overflow-y
suggest changeThese two properties work like overflow and accept the same values. overflow-x affects the horizontal axis. overflow-y affects the vertical axis. If one axis is visible and the other is not, visible is computed to auto.
HTML
<div id="div-x">
If this div is too small to display its contents,
the content to the left and right will be clipped.
</div>
<div id="div-y">
If this div is too small to display its contents,
the content to the top and bottom will be clipped.
</div>
CSS
div {
width: 200px;
height: 200px;
}
#div-x {
overflow-x: hidden;
}
#div-y {
overflow-y: hidden;
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents