Try this:

body {
text-align:center;
}

#page {
background:url(images/home.jpg) no-repeat;
text-align:left;
margin:0 auto;
(add your widths and heights)
}

Let me know if it works.

Nick Lewis
http://nicklewis.smartcampaigns.com

----- Original Message ----- From: "Magenta Placenta" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, July 05, 2005 1:20 PM
Subject: [css-d] Possible to center a body background on differentresolutions?


Is it possible to have a css declared body background that centers regardless of users resolution? I'm using the below to have a centered "shell" which contains the image. This works fine for the most part (and continues to center on higher resolutions) but I get a little bit of scroll bars in Firefox. When I put the image in the body declaration, all is fine, but it's not centered, it's flush left on the screen. I can't seem to get the body class declaration background to center regardless of what I do - is this even possible?

body {
background:#fff;
margin:0px;
padding:0px;
}

#shell {
background:url(images/home.jpg) no-repeat left top;
width:796px;
height:609px;
margin-left:auto;
margin-right:auto;
margin-top:0px;
margin-bottom:0px;
padding:0px;
}


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to