Overflow Property In CSS

 The Overflow property specifies that what we should do if the content of an Element Box Overflows. It has the five property values:

Hidden: In this the Overflow part of the content is Hidden and the rest will be show.

Visible: The Overflow will be visible. It renders outside the Element's Box

Scroll: If the Overflow is Clipped, the scroll bar is added to see the rest of the content.

Auto: If the Overflow is clipped, a scroll bar should be added automatically.

Inherit: Specifies that the value of the overflow property should be inherited from the parent element


For Ex:

<html>
<head>
<style type="text/css">
div.scroll
{
background-color:Pink;
width:100px;
height:100px;
overflow:scroll;
}
</style>
</head>

<body>

<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>

</body>

</html>

Ebook Download
View all
Learn
View all