...

View Full Version : When I center background image, it moves down



fourfins
05-19-2012, 01:41 AM
Trying to set up wordpress blog page here: http://www.solarallianceofamerica.com/blog/

Trying to make a background image with white in the middle for the blog text. Here's the code for the image:


body {
margin:0;
padding:0;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
line-height:12pt;
background:url(http://www.solarallianceofamerica.com/images/bgimg-blog.jpg) center repeat-x;
}

Here's an image of it centered:

http://i.imgur.com/VuBn1.png

Here's an image of it not centered (Varies depending on resolution, obviously not what I want):

http://i.imgur.com/1mQsw.png

I have no idea why it moves down. Thanks for any help.

fourfins

badwolf
05-19-2012, 05:46 AM
Try this in your background rule:


background:url(http://www.solarallianceofamerica.com/images/bgimg-blog.jpg) top center repeat-x;

fourfins
05-19-2012, 06:03 AM
Thanks, that worked.

badwolf
05-19-2012, 06:09 AM
Thanks, that worked.

Your welcome! Good luck with the project. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum