Home
CSS
CSS Overflow
Tryit: Using overflow: auto
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> div { background-color: coral; width: 200px; height: 65px; border: 1px solid black; overflow: auto; } </style> </head> <body> <h2>Overflow: auto</h2> <p>The auto value is similar to scroll, only it add scrollbars when necessary:</p> <div>You can use the overflow property when you want to have better control of the layout. The overflow property specifies what happens if content overflows an element's box.</div> </body> </html>