Link to home
Start Free TrialLog in
Avatar of tips54
tips54

asked on

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
Avatar of p_nuts
p_nuts
Flag of Netherlands image

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.

Avatar of x3man
x3man

Put a "wrapper" div around the main content and apply the following CSS styles:
#wrapper{
      margin-left:auto;
      margin-right:auto;
    }
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/
SOLUTION
Avatar of nap0leon
nap0leon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tips54

ASKER

the site will be redesigned in the near future.