Help center a div and contents  XHTML  CSS

arthurh88
arthurh88 used Ask the Experts™
on
Would like to center this on the screen:  http://www.royhunter.com/partstherapy/

Here is the table version of what I'd like it to look like:  http://www.royhunter.com/partstherapy/contact.aspx?therapist=1

http://www.royhunter.com/partstherapy/  is the version without tables that I'm trying to center.

Here is my stylesheet:  http://www.royhunter.com/styles/directory.css

Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
A simple way is to use <center> tag.


<center>
      <div>
                  Your content goes here
      </div>
</center>
Commented:
Instead of use <center>, deprecated, you can nest your <div id="wrapper">  in a
<div class="container"> with text-align:center css property,
eventually adding some auto margin properties to #wrapper in css, like this:
<html>
<head>
<style type="text/css">
.container { text-align:center; }
#wrapper { margin-left:auto; margin-right:auto; width:70%;
	text-align:left; position: fixed; }
</style>
</head>
<body>
<div class="container">
<div id="wrapper">
...
</div>
</div>
</body>
</html>

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial