Help center a div and contents  XHTML  CSS

arthurh88 used Ask the Experts™
Would like to center this on the screen:

Here is the table version of what I'd like it to look like:  is the version without tables that I'm trying to center.

Here is my stylesheet:

Watch Question

Do more with

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

A simple way is to use <center> tag.

                  Your content goes here
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:
<style type="text/css">
.container { text-align:center; }
#wrapper { margin-left:auto; margin-right:auto; width:70%;
	text-align:left; position: fixed; }
<div class="container">
<div id="wrapper">

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