CSS Overflow: The Overflow property in CSS is used to manage the content if it overflows from its container of the block level. We have seen that all the elements are placed in the form of a rectangular box, whereas these box’s behavior, positioning, and size can be controlled and created by using the CSS.

For example: – If we don’t mention the height and width of a particular box, it will set as vast as any content. Although, if we specify the width and height of a box specifically and any content inside will not be adjusted then what should do. The Overflow Property can be applied to solve this problem. The Overflow Property portrays whether we have to clip the content, show the content on the screen, and render the scroll bars.

Note: The CSS overflow property implements only for the block elements along with the particular height.

Property Values

ValuesDescription
visibleA visible value says that the overflow content is not cropped or clipped. It delivers outer side box of an element. A visible is a type of default value.
hiddenThe overflow content is clipped; the other content is invisible.
scrollThe overflow content is clipped, although a scroll-bar will be added to explore the other content.
autoThe overflow content is clipped, although a scroll-bar will be added to examine the other content.
inheritIt acquires the properties from the parent element.
initialIt sets the properties of CSS to their default value.

Overflow Example

Take a look on the following example:

Output:

CSS Overflow

Pin It on Pinterest

Share This