Home‎ > ‎

Practicing

 I finally managed to put a table in the center of the page. Note: in HTML it is spelled center not centre.

How to Center a Table in a Google Site

posted Dec 8, 2011, 9:44 AM by Gustav Franzsen   [ updated Dec 15, 2011, 5:27 AM ]
It is easy to center text or images in tables, but to position the entire table centrally, is not so straightforward. There are at least two ways, but I prefer the one for its simplicity. In both cases you have to delve into the html of the page. It is not so tricky though, no need to panic!

Here's what you do:
  1. Go to 'Edit' mode for the page
  2. Click on the '<HTML>' button on the extreme right of the editor toolbar
  3. You are now seeing the actual html that was generated for your page
  4. Do not change anything
  5. Scroll down until you see the <table> tag
  6. Normally there will be a <div> tag just before the table commences
  7. If there isn't one, add one directly before the <table> tag
  8. Simply add 'align="center"' into the <div> tag, so that it reads '<div align="center">'
  9. If you had to add a <div> tag, remember to close off the tag, by adding a </div> tag after the </table> closing tag
  10. Click 'Update' and verify that the result is what you desired
  11. If you are happy, click 'Save' and the changes will be saved
Comments