Overflow Property In CSS

The Overflow property specifies that what we should do if the content of an Element Box Overflows. It has five property values:
  1. Hidden: In this the Overflow part of the content is Hidden and the rest will be shown.
  2. Visible: The Overflow will be visible. It renders outside the Element's Box
  3. Scroll: If the Overflow is Clipped, the scroll bar is added to see the rest of the content.
  4. Auto: If the Overflow is clipped, a scroll bar should be added automatically.
  5. Inherit: Specifies that the value of the overflow property should be inherited from the parent element
For Ex:
  1. <html>
  2. <head>
  3. <style type="text/css">
  4. div.scroll
  5. {
  6. background-color: Pink;
  7. width: 100px;
  8. height: 100px;
  9. overflow: scroll;
  10. }
  11. </style>
  12. </head>
  13. <body>
  14. <div class="scroll">The clients included businessmen from Mumbai and Delhi and a few Bollywood personalities, who wanted the agency to spy on either their spouses or rivals.</div>
  15. </body>
  16. </html>