suggest how to center a web page

I have this site I've taken over managing and for the longest I have not been able to get the page to centered.  any suggestions on how get this right? aspx site.

www.c-m-p.com
tips54Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

p_nutsCommented:
the easy way is to put <center> tag after the body tag and </center> before the </body> tag.

or you can use a wrapper div and define the position using css.

0
x3manCommented:
Put a "wrapper" div around the main content and apply the following CSS styles:
#wrapper{
      margin-left:auto;
      margin-right:auto;
    }
0
x3manCommented:
Looking at the web page HTML it is using absolute positioning which can be tricky to center. Have a look at the guide for centering absolute positioned elements here: http://dustyreagan.com/using-css-to-absolute-position-object/
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

nap0leonCommented:
You'll need to move you backgroundimage out of your BODY tag and into the wrapper

CSS:
#wrapper{margin:0 auto; backgound: url ('http://www.c-m-p.com/Images/instructionhome.jpg') top left no-repeat}

Open in new window


HTML:
<body>
  <div id="wrapper">
    ... your current page's code goes here ...
  </div>
</body>

Open in new window

0
COBOLdinosaurCommented:
Well let's see.  No doctype; therefore in quirks mode.  Table based layout; so very little flexibility.  Absolute positioning; so elements basically disconnected from the flow.

From one Expert a suggestion to use the center  tag, which is no longer supported by the standards... a really bad idea.

On the surface the suggestion to use margin:auto is good except with position:absolute in play it can't work correctly.

If I had a page like this in a project I was doing it would be assigned for re-write using a standards based approach.  You may hack and slash and find a way to make it behave a little better, but it is a very defective page, and it will just keep getting worse as browsers move more and more to comply with HTML5 and CSS3.  The best advice I can give you is bite the bullet and re-write the page, because it is going to require more resources to maintain than to fix it.


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
abolinhasCommented:
#wrapper{
position:absolute;
widht:500px;
height:500px;
left:50%;
top:50%;
margin-left: -250px;
margin-top:-250px
}
0
tips54Author Commented:
the site will be redesigned in the near future.
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
Microsoft IIS Web Server

From novice to tech pro — start learning today.