Computer >> Computer tutorials >  >> Programming >> CSS

CSS overflow: hidden


In the CSS overflow property with value hidden, the overflow is clipped. The content hides. You can try to run the following code to implement CSS overflow: hidden property −

Example

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            background-color: orange;
            width: 250px;
            height: 35px;
            border: 2px solid blue;
            overflow: hidden;
         }
      </style>
   </head>
   <body>
      <h1>Heading</h1>
      <div>Overflow property used here. This is a demo text to show the working of CSS overflow: hidden. This hides the content.</div>
   </body>
</html>

Output

CSS overflow: hidden