property-value

overflow/hidden — CSS reference

Clips overflow and suppresses user scrolling controls; script or focus navigation can still scroll the box. This example uses the same value on both axes; mixing values can change their computed forms.

Formal Syntax & Structure

css syntaxcss
overflow: hidden

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS sizing and overflow lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#a{width:100px;height:60px} #b{width:180px;height:180px;background:linear-gradient(teal,white)} #a{overflow:hidden}</style><body><div id="a" tabindex="0" aria-label="Scrollable example" class="sample"><div id="b">Wide and tall content</div></div></body></html>
CSS Reference