CSS Not Centering Container

Posted by user269799 on Stack Overflow See other posts from Stack Overflow or by user269799
Published on 2010-05-08T19:32:01Z Indexed on 2010/05/08 19:38 UTC
Read the original article Hit count: 144

Filed under:

I have a container div. Width: 80%, margin-left: 10% and margin-right 10%. The problem is, the container is displaying to the left in all the browsers I check. If I change the value of margin-left to 20%, it looks ok.

I will supply code if necessary but is there anything obviously wrong here? Isn't 80 with a margin of 10 on each side correct to center a div?

GF

© Stack Overflow or respective owner

Related posts about css-positioning