HTML CSS examples for CSS Layout:Responsive Layout
Responsive div's floating and centered
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!-- w ww. ja v a 2 s .c om--> background-color:Chartreuse; width:501px; text-align:center; } .item { display:inline-block; background-color:yellow; width:100px; height:100px; } </style> </head> <body> <div class="container"> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> <div class="item"></div> </div> </body> </html>