HTML CSS examples for CSS Layout:Box
Centering two boxes on resize
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #boxContainerContainer {<!-- w ww . j a v a 2s.com--> } #content { background:Chartreuse; text-align:center; display:inline-block; border:dotted yellow; margin:0px auto 11px auto; width:100%; } #box1, #box2 { max-width:26em; min-width:21em; width:46%; height:51px; background:blue; display:inline-block; } </style> </head> <body> <div id="content"> <div id="box1"></div> <div id="box2"></div> </div> </body> </html>