property-value

overflow/scroll — CSS reference

Creates a scroll container and requests a scrolling mechanism even if content fits; overlay behavior depends on the platform. This example uses the same value on both axes; mixing values can change their computed forms.

Formal Syntax & Structure

css syntaxcss
overflow: scroll

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:scroll}</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