Google-docs – How to automatically size tables to the entire width of a Google Doc

google docs

When I insert a table into Google Docs (say 2×3), something magical happens:

enter image description here

… whenever I delete any of the three columns (say "c" in this case), the table automatically resizes the columns to span the entire document width:

enter image description here

If I reset it to 3 columns again:

enter image description here

and resize column "a", the table is now in a "corrupt" state:

enter image description here

In the corrupt state, deleting columns a or b will resize correctly (e.g. deleting column b in this case):

enter image description here

… however, if I undo:

enter image description here

… and I try to delete column "c", notice what happens:

enter image description here

It no longer resizes the table to the document width. This is what I mean by a corrupt state.

This is annoying because if I need it to line up perfectly with another table in the document, it will be off by a few pixels.

How can I restore a table to its "pristine" state (i.e. non-corrupt state) if I dragged one or more columns?

Best Answer

This is all because of the Column width property in a table.

If you right-click the table and choose Table properties, you'll see a dialog such as:

enter image description here

In the original "pristine" state, all 3 columns have their column width unchecked. In the following image I'm using the second row to indicate the column width property of each column:

enter image description here

Thus all 3 columns have the column width unchecked.

After you resize column "a", notice what happens to the column widths:

Columns "a" and "b" get explicit values, while "c" is still unchecked:

enter image description here

Example of column "a" Table properties:
enter image description here

So long as you have an unchecked column, it'll resize to fit the document width. Thus if you delete column "b":

enter image description here

... column "c" will expand to fill in the remaining value.

Now it's clear why deleting column "c" causes a problem:

enter image description here

... both "a" and "b" had their values explicitly set, and neither will expand to fill the document.

However, this is easily fixed. If you right-click column "b" and you uncheck column width, you'll see that it correctly expands to fill the document:

enter image description here

Thus, to go from a "corrupt" table to a "pristine" table, choose the column(s) you want to auto expand, and remove their explicit widths.


Side note: I mention column(s) in plural because multiple columns could be in the unchecked state at a time even if one of the columns has an explicit value:

enter image description here

In this case it'll just evenly distribute the available width between the columns that are unchecked ("b" and "c" become the same width in this case).

Note: You may be tempted to use the "distribute columns" feature to achieve a similar effect, but it distributes columns using explicit values. Thus you'll end up with corrupt tables. Avoid using that feature, and when you want to distribute columns, just remove their column widths as outlined above.