Home › Forums › CSS › Center elements inside of a container › Re: Center elements inside of a container
September 23, 2008 at 1:09 pm
#49989
Participant
Your code looks ok. When I position my container to be centered, I always like to add a position relative in there with the margin:0 auto; and the width.
I think your IE problem is not the original width of your box class, it’s the margins and paddings. you should change your conditional comment not to shrink the width of the box, but the margin. IE always doubles the margins on floats. Try putting 5px for your margin and see if you get any results.