HTML CSS examples for CSS Layout:Responsive Layout
create horizontal elements in responsive way
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!-- w ww .j a v a2s . com--> } .block { width:100px; height:100px; background:grey; } @media screen and (min-width : 320px) and (max-width : 480px) { .container { white-space:nowrap; overflow-x:scroll; } .block { display:inline-block; } } </style> </head> <body> <div class="container"> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> <div class="block"></div> </div> </body> </html>