Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> .scroll { width: 200px; height: 300px; border: 1px solid; overflow: auto; margin-bottom: 10px; } .scroll-x { width: 200px; height: 300px; border: 1px solid; overflow-x: auto; overflow-y: hidden; margin-bottom: 10px; } .scroll-y { width: 200px; height: 300px; border: 1px solid; overflow-y: auto; margin-bottom: 10px; } .scroll>div { width: 400px; height: 50px; background: #ccc; } .scroll-y>div { width: 200px; height: 50px; background: #ccc; } .scroll-x>div { width: 400px; height: 50px; background: #ccc; overflow: hidden; } </style> </head> <body> <h1>Example with Overflow Property</h1> <h2>overflow overflow scroll auto</h2> <div class="scroll"> <h2>Overflow Property </h2> <div> <h2>overflow scroll property</h2> </div> <p> Lorem Ipsum is dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p> </div> <h2>overflow overflow-x auto</h2> <div class="scroll-x"> <h2>Overflow Property </h2> <div> <h2>overflow scroll-x property</h2> </div> <p> Lorem Ipsum is dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s when an unknown printer. </p> </div> <h2>overflow overflow-y auto</h2> <div class="scroll-y"> <h2>Overflow Property </h2> <div> <h2>overflow scroll-y property</h2> </div> <p> Lorem Ipsum is dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s when an unknown printer took a galley of type and scrambled it to make a type specimen book. software like Aldus PageMaker including versions of Lorem Ipsum.but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. </p> </div> </body> </html>