In CSS, the overflow property is used to control the behavior of content that overflows its containing element. It is often used in conjunction with a specified height or width to define how the content should behave when it exceeds the specified dimensions. The overflow property can take several values:

  1. visible (default): Content is not clipped, and it may overflow the content box.

    css
    .example { overflow: visible; }
  2. hidden: Content that overflows is clipped and not visible.

    css
    .example { overflow: hidden; }
  3. scroll: Adds a scrollbar to the element, allowing the user to scroll and see the hidden content.

    css
    .example { overflow: scroll; }
  4. auto: Similar to scroll, but a scrollbar is only added if the content overflows.

    css
    .example { overflow: auto; }
  5. inherit: The overflow property inherits its value from the parent element.

    css
    .example { overflow: inherit; }

Here's a simple example illustrating the use of the overflow property:

css
.container { width: 200px; height: 100px; overflow: scroll; } .content { width: 300px; height: 150px; background-color: lightblue; }
html
<div class="container"> <div class="content"> <!-- Content that exceeds the container dimensions --> <!-- Scrollbars will appear due to the overflow: scroll; property --> </div> </div>

In this example, the content within the .content div exceeds the dimensions specified by the .container div, and the scrollbars will appear because of the overflow: scroll; property on the container.

Adjust the values and properties based on your specific layout and design requirements.