HTML CSS examples for CSS Widget:UL
Set a ul size according to its containing div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #container {<!-- w w w . j a va 2 s .com--> height:100px; width:301px; overflow-y:auto; overflow-x:none; border:2px solid Chartreuse; } </style> </head> <body> <div id="container"> <ul> <li>Lorem ip</li> <li>Lorem ip</li> <li>Lorem ip</li> <li>Lorem ip</li> <li>Lorem ip</li> <li>Lorem ip</li> <li>Lorem ip</li> <li>Lorem ip</li> </ul> </div> </body> </html>