Summary: Centering Tables

For explanation, see "Table Center Test" page.

Behavior in Standard Mode

Example <div> <table> MSIE6–7 MSIE5 NS4 MacIE5 Firefox/Mozilla/NS6.1 Opera (5 and 6) Opera (7 and 9) Safari
      table alignment content alignment table alignment content alignment table alignment content alignment table alignment content alignment table alignment content alignment table alignment content alignment table alignment content alignment table alignment content alignment
IIa. none margins center left left left left left center left center left center left center left center left
IIb. none text-align left center left center left left left left left center left center left center left center
IIc. margins none left left left left left left left left left left left left left left left left
IId. text-align none center center center left center left left left left center left left left center left left
IIe. text-align margins center center center left center left center left center center center left center center center left
IIf. text-align margins[1] center left center left center left center left center left center left center left center left

Behavior in Quirk Mode

Only those browsers that support doctype switching are shown.

Example <div> <table> MSIE6–7 MacIE5 Firefox/Mozilla/NS6.1 Opera (7 and 9)
      table alignment content alignment table alignment content alignment table alignment content alignment table alignment content alignment
IIa. none margins left left center left center left center left
IIb. none text-align left center left left left center left center
IIc. margins none left left left left left left left left
IId. text-align none center left center left left left left left
IIe. text-align margins center left right? left center left center left
IIf. text-align margins[1] center left right? left center left center left

[1] Note: An additional declaration of “text-align: left” was assigned to the table cells in example IIf.


Home  |  Web Authoring  |  Contact Me