Div Not Centering

I am trying to center a div.  However; it keepshugging the right side of the page.
Here is the CSS.
#main {
	background-color:#fff;
	position:absolute;
	width:1000px;
	height:100px;
	margin-top:60px;
	margin-right:auto;
	margin-left:auto;
}

Open in new window


The HTML
 <div id='main'></div>

Open in new window


The page.
www.davidschure.com/about
DS928Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

GaryCommented:
Your cssmenu div is not closed screwing up the layout
0
COBOLdinosaurCommented:
Position:absolute without positioning values defaults to left:0;top:zero and the margin setting are irrelevant.  either use margins properties or fully defined positioning properties, not both.

Cd&
0
DS928Author Commented:
Got rid of Position Absolute.  Closed div, but.....the div is now centered but the Logo moved down.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

COBOLdinosaurCommented:
Yeah well position:fixed and float:left on the same element is probably confusing the hell out of the browser.

When you use position then you specify the position.  using anything that applies to the position of absolute or positioned elements  other than top, right, bottom and left is incorrect. and makes it impossible for the browser to render correctly.

Also there is no worse way then using position to do layout, there are dozens of more practical ways to doin things without creating the maintenance issues you always get when you are force to use position.  Position should be considered a last resort option, not a promary tool.

Cd&
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DS928Author Commented:
Got rid of it all.  Almost there.
CSS for Logo
<style type="text/css">
		#Logo{ margin:6px 0px 0px 10px; float:left; opacity: 0.7;}
	</style>

Open in new window

CSS for white box.
#main {
	background-color:#fff;
	width:960px;
	height:500px;
	margin-top:50px;
	margin-right:auto;
	margin-left:auto;
}

Open in new window

The logo on the about.html is being pushed down from the top.  The last problem...I hope.
0
DS928Author Commented:
Took off the float as well.  Seems to be closer.  However not sure why the SMG is slightly different on each page.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.