To have a table element obey its container's text-align, set it to "
display:inline-table".
For a non-table element, use "
display:inline-block" (assuming one needs to control width/etc), otherwise "
display:inline" indicates a regular text-based/formatting element.
Otherwise, "
margin:auto" is the easiest way to horizontally center non-inline elements, and is not a workaround but
part of the CSS specification.
(For vertical margins, auto resolves to zero - use "
margin:TOPBOTTOM auto" or "
margin:TOP auto BOTTOM" if needed.)