HTML CSS examples for CSS Layout:Box
Horizontal alignment of 3 boxes in a wrapper
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .box {<!-- w w w.j a v a2s. com--> background:gray; display:inline-block; width:100px; padding:4px; margin:4px auto; } #red-wrapper { width:100%; background:red; text-align:center; } </style> </head> <body> <div id="red-wrapper"> <div class="box"></div> <div class="box"></div> <div class="box"></div> </div> </body> </html>