views:

27

answers:

2

I have a theme that I'm modifying for my site. I currently have it live on my test domain while I tinker with it before launch.

http://www.networkgenius.org

The #content-wrap div is centering, but too far to the right for some reason. I've absolutely no idea why it's doing this, especially since everything else is centering properly. What is the problem?

I did add a 15px padding to the content-wrap area as I've changed the body's background color to the grey that you see and obviously didn't want the text pressed right up against the edges of the wrapper.

Thanks for your help!

-Sootah

A: 

You have padding on div#content. Change it to

padding: 25px 0;

(You have firebug, right?)

gregmac
yeah.. kindly use firebug. it is most useful in such scenarios.
ZX12R
+1  A: 

I suppose the "content-wrap" div is a wrapper for "content" div.

The wrapper has a width of 980px and the content has a width of 980px.

All is well till now. The content has padding of 15px on both sides. This adds 30px to it's width effectively making it 1010px

This extra width makes it move to the right.

Reduce the width of the content to 950px. Or remove the padding.

This should work.

ZX12R
Ah, so the padding setting doesn't compress the contents of the div down into 980px, thereby reducing the "printable area" or whatever you'd like to call it to 950px, it actually adds pixels onto the divs area and the "printable area" remains the same.I altered the CSS as you suggested and the issue was corrected. Thank you!!-Sootah
Sootah
yes... this is the difference between margin and padding.
ZX12R