Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS Overflow</title> <style> div.hidden { background-color: #d5ffff; width: 100px; height: 100px; overflow: scroll; } div.scroll { background-color: #e4ffe4; width: 100px; height: 170px; overflow: hidden; } </style> </head> <body> <p>The overflow property specifies what to do if the content of an element exceeds the size of the element's box.</p> <p>overflow:scroll</p> <div class="scroll">You can use the overflow property when you want to have better control of the layout. The default value is visible.</div> <p>overflow:hidden</p> <div class="hidden">You can use the overflow property when you want to have better control of the layout. The default value is visible.</div> </body> </html>