HTML CSS examples for CSS Layout:Position
Using margin along side position
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html,<!--from www .j a v a 2s . com--> body { margin:0; height:100%; } .page { min-height:100%; margin:0 auto; width:301px; background:green } </style> </head> <body> <div class="page"> Lorem ips </div> </body> </html>