HTML CSS examples for CSS Layout:Width
Set a max-width larger than 100%
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!--from w w w . j a va2s . co m--> width:501px; overflow:auto; } .list { width:5001px; } ul { width:5001px; overflow:visible; width:auto; display:inline-block; } li { background:Chartreuse; display:inline-block; margin:0 6px; padding:3px 6px; } </style> </head> <body> <div class="container"> <div class="list"> <ul> <li>Banana</li> <li>AAA</li> <li>BBB</li> <li>CCC</li> <li>DDD</li> <li>EEE</li> </ul> </div> </div> </body> </html>