Centered div

#container{ position: absolute; top: 50%; margin-top: -200px;/* half of #content height*/ left: 0; width: 100%; } #content { width: 624px; margin-left: auto; margin-right: auto; height: 395px; border:1px dashed; text-align:center; }