CSS overflow-x



The CSS overflow-x allows you to decide what to do with the left right edges of the content.

Example

You can try to run the following code to implement the overflow-x property

Live Demo

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

Output

Updated on: 2020-06-30T09:30:42+05:30

320 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements