To horizontally center an absolutely positioned div you don't use left: 0 and right: 0. As you can see, that actually stretches it out by setting one end of the div to the left margin of the containing box, and the other end to the right margin.