property

overflow — CSS reference

Sets horizontal and vertical overflow. Initial visible on both axes; not inherited. One keyword applies to both; two specify x then y. When one axis is neither visible nor clip, visible on the other computes to auto and clip computes to hidden. Non-visible overflow values other than clip generally establish an independent formatting context for block boxes.

Formal Syntax & Structure

css syntaxcss
[ visible | hidden | clip | scroll | auto ]{1,2}

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:visible 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