Hi.
I have problem here and i can't align my whole page in the center
here is the css code:
body
{
background-image:url('images/bg.jpg');
background-color:#592331;
background-repeat:repeat-x;
position:absolute;
margin: 0px 0px;
padding: 0;
text-align:center;
}
.Content {
width:642px;
margin:auto;
text-align:center;
padding:0px;
}
(2012-06-24, 02:07 PM)BlinGm Wrote: [ -> ]Hi.
I have problem here and i can't align my whole page in the center
here is the css code:
body
{
background-image:url('images/bg.jpg');
background-color:#592331;
background-repeat:repeat-x;
position:absolute;
margin: 0px 0px;
padding: 0;
text-align:center;
}
.Content {
width:642px;
margin:auto;
text-align:center;
padding:0px;
}
What do you want aligned? If it's .Content replace that with this:
body
{
background-image:url('images/bg.jpg');
background-color:#592331;
background-repeat:repeat-x;
position:absolute;
margin: 0px 0px;
padding: 0;
text-align:center;
}
.Content {
width:642px;
margin:auto auto;
text-align:center;
padding:0px;
}
If you want body aligned do this:
body
{
background-image:url('images/bg.jpg');
background-color:#592331;
background-repeat:repeat-x;
position:absolute;
margin:auto auto;
padding: 0;
text-align:center;
}
.Content {
width:642px;
margin:auto auto;
text-align:center;
padding:0px;
}
Try that. Let me know if that works.
Basically what Scois0n posted: change "margin: 0px 0px;" to "margin: auto;"
Also, using 0px is a little redundant. Just "0" is enough.