Page Not Centering

Hey guys!

I need some quick help here. Silly issue, but I can’t seem to get this site here to be centered in any browser except IE6. I can’t seem to get it to center. Much appreciated!

Thanks,
Eric Huang

I would change

.centered { width: 1000px; }

to:

.centered { width:960px !important; }

This works for me in firefox

Forget about align=“center” and align=“left”. Trust me, this is totally out of date.

Firstly, give that main wrapping div an id, such as #wrapper:


<div id="wrapper">

</div>

Then in your CSS, place this:


#wrapper {
  width: 960px;
  margin: 0 auto;
}

The auto left and right margins are what center the layout.

Hi, the page is centering for me in IE6 :slight_smile:

I agree 100% with ralph.m. You should be using CSS to control alignment.

However, if you wish to proceed with your current method, set the width attribute of the div that wraps your main div to the correct width of its content, which is 960px, not 620px.

Thanks guys! Those suggestions work.