Forum Moderators: not2easy
previous 2 links are excellent for horizontal centering.
Vertical centering is a bit of a nightmare using CSS, but there is a workaround [wpdfd.com]
Suzy
[in HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><title>vertically centering DIV</title></head>
<body>
<div>OBJECT</div>
</body>
</html>
[in CSS]
html { display:table; margin:0; padding:0; width:100%; height:100%; border-spacing:0; }
body { display:table-row; }
div { display:table-cell; padding:0; text-align:center; vertical-align:middle; }
Correctly rendered in Mozilla.
It arranges `OBJECT` in the center of top and bottom.