Hi there guys,
I have been having the toughest time centering my site. I'm using DW CS4 and designed the site in Fireworks CS4. I've tried all sorts of things including putting the entire body in a wrapper and trying to center it and I have still had no luck. I'm at at wit's end. I'm still somewhat of a novice at this and not sure what I am doing wrong and would greatly appreciate your help. Thanks!
Website:
www.deaaralewis.com
Two things required to center your site: a wrapper with a defined width and left/right margins both set to auto.
The way the site is coded at the moment, <div id="main"> is effectively acting as the wrapper.
So change
#main {
width:800px;
margin: 0px auto 0px 0px;
border: 0px solid #f0f0f0;
background-color: #522900;
}
to
#main {
width:800px;
margin: 0px auto 0px auto;
border: 0px solid #f0f0f0;
background-color: #522900;
}
And check the errors in your code:
This one needs sorting:
</style>
</head>
<div id="wrapper">
<body>
<div id="main">
The <body> tag must come after the </head> tag.
Martin
http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.deaaralew is.com%2F
North America
Europe, Middle East and Africa
Asia Pacific