HTML CSS examples for CSS Layout:Div Align
Place div to the top center of a page
<html> <head> <style> body {<!--from w w w. j a va 2s. c o m--> margin:0; padding:0; background:Chartreuse; } #container { width:601px; height:601px; margin:6px auto 0 auto; background:yellow; } </style> </head> <body> <div id="container"></div> </body> </html>