HTML CSS examples for CSS Widget:UL Element
List with a scrollbar
<html> <head> <style> body {<!--from w w w . jav a 2 s . c om--> font-family:sans-serif; } ul { background:gray; list-style:none; max-height:161px; overflow-y:scroll; padding:0 5px; display:inline-block; } li { color:Chartreuse; padding:5px 0; } </style> </head> <body> <ul> <li>Lorem ipsum dolor sit amet,</li> <li>Lorem ipsum dolor sit amet, consectetur </li> <li>Lorem ipsum dolor sit amet, consectetur adi</li> <li>Lorem ipsum dolor sit amet, consectet</li> <li>Lorem ipsum dolor sit amet, consectetur adipisc</li> <li>Lorem ipsum dolor sit amet, cons</li> <li>Lorem ipsum dolor sit amet, consect</li> <li>Lorem ipsum dolor sit ame</li> <li>Lorem ipsum dolor sit amet, consect</li> <li>Lorem ipsum dolor sit amet, cons</li> </ul> </body> </html>