Background Image help

Associate
Joined
3 Aug 2006
Posts
610
Location
London, UK
Is there any way of putting a background image on a web page and centering it. I've already tried:

Code:
body{
	margin: 0 auto;
	text-align: center;
	font-family: Arial, Helvetica, sans-serif; 
	background-color: #000000;
	background-image:url('images/page-bg.jpg');
	background-repeat:repeat-y;
	background-position-x:center;
	}

but this doesn't work properly in Firefox and the background image just appears on the left.

Fail that, Is there a way of making mozilla just not read those lines? Also the underscore hack doesn't seem to be working in IE7

EDIT: I put the site up at http://mitmor.freehostia.com
 
Last edited:
You don't need the -x bit.

In fact, you might as well shorten it all as well :)

background: #000 url('images/page-bg.jpg') repeat-y center;
 
Back
Top Bottom