Guess my alignment problem, please

My site isnt live, so I need suggestions on what the problem might be.

I have a border area header that is set to display: block; margin-left:auto; margin-right:auto; (It centers perfectly)

Then the content area underneath looks the exact same, except it is a little off center to the right. What must the issue be?

It would be best to make up a test page (with CSS included in <style> tags in the head) and post the code here so that we can see what’s going on, as otherwise there’s no way of knowing what’s happening.

Not sure what you mean by that, but no doubt the example code would make that clear. :slight_smile:

Do you have any margins or settings applied to the off center items? Try putting this in your CSS file

*{margin:0;padding:0;}

As Ralph said we really need code (enough to reproduce the problem, and preferably nothing more) to identify the issue.

well, here’s the css for part of the area that is off center… See anything that may be causing it to line up slightly right?

.box_header{ background:url(5-black/box_top.png) no-repeat; width:992px; height:24px; }
.box_bg{ background:url(5-black/box_bg.png) repeat-y; width:992px; }
.box_bottom{ background:url(5-black/box_bottom.png) no-repeat bottom; width:992px; }

We really need to see the HTML that goes with that. Also make sure to try Ryan’s code above. It may well be that some default margin or padding is causing a problem, and his code is a nice way of putting that to the test.

Never-mind… Problem finally solved. It wasn’t actually a css issue. Those images were just larger than what my css said for the width, so they were displaying off center. Thanks for the help, and sorry for the vague question.

No problem! Often, just being able to ask a question helps you find the answer yourself—which is a perfectly good way to use a forum like this. :slight_smile:

So true… just pasting those images from my css made me realize it. :slight_smile: