You started working in a wrong way from the very beginning. Please stop using
style
and other formatting attributes in HTML, move it all to CSS.
Please see:
http://www.w3schools.com/css/css_align.asp[
^],
http://www.w3schools.com/cssref/pr_text_text-align.asp[
^],
http://www.w3.org/Style/Examples/007/center.en.html[
^],
http://www.w3.org/TR/css3-align/[
^].
Also, your requirement is not clear. Center relative to what? A row? If you have more then one element in a row, it's not possible, as it would mean that these elements would overlap at the center, which is not going to happen, unless you want to use absolute positioning (not recommended). Maybe, you have only one element per row, or you mean something else, such as centering relative to
td
. But don't clarify it yet. First, try to defined proper styles in a right way by yourself and ask another question if you really face a problem.
—SA