Revision: 46278
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 16, 2011 16:41 by a1ias
Initial Code
/* VERTICALLY */ div#splash { width: 300px; height: 200px; position: absolute; top: 50%; left: 50%; margin-top: -100px; margin-left: -150px; } /* HORIZONTALLY (1) */ body {text-align: center;} div#content { width: 40%; margin: 0px auto; text-align: left; } /* HORIZONTALLY (2) */ div#content { position: absolute; left: 50%; width: 40%; /* could be in px as well */ margin-left: -20%; }
Initial URL
Initial Description
Initial Title
Vertical & horizontal centering with CSS
Initial Tags
Initial Language
CSS