Jump to content

Why won't my site center?


clbembry
 Share

Recommended Posts

Hello everyone. I'm redoing my website and I can't get it to center. This is my css code for the container.

#container {height: 732px;width: 800px;margin-left: auto;margin-right: auto;padding: 0px;text-algin: center;border: 1px solid #0071C1;border-bottom: 0px;background-color: white;text-align: left;}

If you want to view my site, here is the link: My Website LinkI'm only hosting it on Freewebs until it is complete

Link to comment
Share on other sites

It's not your container; it's your body tag. You're gonna hate yourself, too.

body {	padding: 0px;	margin: 0 0 20px 0	text-align: center;	background-image: url(images/background.png);	font-family: georgia;	font-size: 12px; }

See the missing semicolon after your margin declaration? I'm not sure what it's doing to your margins (probably nothing) but I guarantee it's clobbering your text-align declaration, and that's what'll handle the centering on IE. That is your browser, yes? I ask because everything looks fine in Firefox. When I loaded a corrected version of your stylesheet into IE, boom! it all centered.

Link to comment
Share on other sites

@upheh, was just about to write that.---Also, in Firefox, your footer image Isn't in the spot you have it defined for in IE.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...