HTML CSS examples for CSS Widget:UL Horizontal
Horizontal scroll list width adjust to new items
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .category {<!-- www . ja v a2s . c om--> overflow-x:scroll; margin-bottom:51px; } .products { border:2px solid Chartreuse; display:inline-block; width:auto; white-space:nowrap; margin:0; padding:0; } .products li { display:inline-block; } .product { margin-right:100px; } </style> </head> <body> <div class="category"> <ul class="products"> <li class="product">Lorem ips</li> <li class="product">Lorem ips</li> <li class="product">Lorem ips</li> <li class="product">Lorem ips</li> <li class="product">Lorem ips</li> </ul> </div> <div class="category"> <ul class="products"> <li class="product">Lorem ips</li> <li class="product">Lorem ips</li> </ul> </div> </body> </html>