HTML CSS examples for CSS Property:overflow
"Sticky" sidebar overflowing vertically
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html {<!-- w ww .ja va 2s. c o m--> overflow:hidden; } .sidebar { position:fixed; width:201px; height:401px; background:Chartreuse; top:63px; bottom:11px; overflow:hidden; } .content { overflow:auto; width:100%; height:100%; padding-right:21px; } .content ul li { height:301px; } </style> </head> <body> <div class="sidebar"> <div class="content"> <ul> <li>Lorem</li> <li>Lorem</li> <li>Lorem</li> </ul> </div> </div> </body> </html>