Sometimes we have a one-line div, having 3 elements. One floats to the left, one floats to the right, and one in the middle. The one in the middle often gets pushed around by the left/right element, resulting off-centered. related question.
[code language=“html”]
\[/code\]
The fix is to give the following css to the center div.
[code language=“css”] position: absolute; margin-left: auto; margin-right: auto; left: 0; right: 0; [/code]
Thanks to the following link. =)
http://stackoverflow.com/questions/8508275/how-to-center-a-position-absolute-element