<style type="text/css">
body {
text-align: center; /* for IE5 and IE5.5 */
}
#centered {
width: 500px;
margin: 0 auto; /* for all smart browsers */
text-align: left; /* to make text not centered */
}
</style>
<body>
<div id="centered"></div>
</body>
This will align page to the center horizontally. Vertically cannot really be done very easy, because there is no default height property (100% is invalid). Don't forget to put a complete doctype at the top of the page.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.