HTML CSS examples for CSS Property:overflow-y
Overflow-y:scroll for long text
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> h2 {<!-- w w w. j a v a 2 s . co m--> font-size:2.4em; } .box { margin:2em; border:2px solid Chartreuse; width:151px; height:56px; overflow:hidden; overflow-y:scroll; } .wrapper { -webkit-column-width:151px; column-width:151px; height:100%; } </style> </head> <body> <div class="box"> <h2>Lorem ipsum do</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed ferm</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed ferm</p> </div> <div class="box"> <div class="wrapper"> <h2>Lorem ipsum do</h2> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed ferm</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed ferm</p> </div> </div> </body> </html>