concept
scroll-container — CSS reference
A scroll container exposes a scrollport through which its scrollable overflow area can be viewed. Scroll offsets can change without resizing the element. Hidden can allow programmatic scrolling, while clip does not create a scroll container. Keep keyboard access and visible focus in mind for interactive scroll regions.
Formal Syntax & Structure
css syntaxcss
overflow: auto | scroll | hiddenWorking 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:auto}</style><body><div id="a" tabindex="0" aria-label="Scrollable example" class="sample"><div id="b">Wide and tall content</div></div></body></html>