This box is horizontally
and vertically
centered.(
Doesn't work in IE5/Mac)
And it's
"elastic" like the nice example
here.
body {
overflow:auto;
background-color:#fff;
}
#Content {
position:absolute;
left:50%;
top:50%;
width:30em;
height:42em;
/* the width/2 */
margin-left:-15em;
/* the height/2 */
margin-top:-21em;
border:1px dashed #333;
background-color:#eee;
text-align:left;
font:1.1em verdana;
padding:1em;
}
body>#content {/* boxmodel-hack that avoids IE to
read the following definitions */
margin-left:-16em; /* Overwrites the wrong IE values.
Correct value for w3c compliant browsers */
margin-top:-22em; /* Overwrites the wrong IE values.
Correct value for w3c compliant browsers */
}