So if you have a table code like the ones below in wordpress, how do you center it in the post? because by default they are left aligned, I want them in the center...what code should I add to do that? thanks in advance! <table> <tbody> <tr> <td> 1</td> <td>1</td> <td>1</td> </tr> <tr> <td>2</td> <td>2</td> <td> 2</td> </tr> </tbody> </table>
hi! try this, <table align="center"> <tbody> <tr> <td> 1</td> <td>1</td> <td>1</td> </tr> <tr> <td>2</td> <td>2</td> <td> 2</td> </tr> </tbody> </table> hope this one will help you!
Get used to CSS. IF you have a CSS document, add this: table { margin-left: auto; margin-right: auto; } Code (markup): It tells the browser to load the table tag with the left and right margins set to auto, which will make them equal, and thus center your table.
Basically identify what you want to center and go to the HTML mode of the new post window in wordpress and use the below code: replace the "content to center" with the stuff you want to center. cheers Josh
Assuming you'd want all tables centered and not just this one, the CSS fix will automatically center them all in the future without having to add any additional code.