First, there is no "align" property in CSS. Your website also doesn't show the document.
To get the form centered, do this:
Code:
#idClientLoginMainPage {
position: absolute;
left: 0;
top: 0; /* A unit of measurement is not required for zero length, zero is still zero regardless of the unit */
width: 700px;
height: 550px;
padding: 10px;
text-align: center; /* You need this for IE 5.5, so it can stay, but that's not how you center a box
You'll need this for IE 6 too, if you're in quirks rendering mode.
You'll also find that all the text in all child elements is also centered
since this property is inherited */
}
I'm assuming that the thing you're trying to center is a <form> element with fixed dimensions inside of this "idClientLoginMainPage" element. If that is correct the CSS would look like this to center the <form>.
Code:
#idClientLoginMainPage form {
width: 600px; /* Just made that up. */
border: 1px solid black; /* So you can see the dimensions */
margin: auto; /* centers the form */
text-align: left; /* Reset the inheritence of text-align: center; */
}
If you're trying to center the absolutely positioned "#idClientLoginMainPage" element, that'd be done as follows:
Code:
#idClientLoginMainPage {
position: absolute;
left: 50%; /* offset from the left by 50%, step 1 in centering */
top: 0;
width: 700px; /* Give it a fixed width, step 2 in centering */
height: 550px;
padding: 10px;
margin-left: -350px; /* Half the width to center, step 3 in centering */
text-align: center;
}
HTH!
Regards,
Rich
--
[
http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design