Keeping an Image Centered in a Table Cell

by Allen Wyatt
(last updated May 24, 2014)

4

Michael wonders how he can center a picture or graphic in a table cell, both vertically and horizontally, and have it stay centered if the cell changes size. He has tried several methods proposed by various websites and forums, but they have all either not worked or been too cumbersome to use.

Before figuring out how to center your image in a table cell, you must understand that there are two ways that graphics can be inserted in a Word document: floating or inline. The format used by Word depends on what you are inserting. If you insert a graphic, it is inline by default. If you insert a shape, it is floating by default. When putting a graphic in a table cell, you'll never be able to really get it right (and keep it right) if the graphic is floating. You need to make sure it is inline. An inline graphic is pulled off of the graphic "layer" and placed inline with the text that surrounds it. It is, essentially, treated like any other textual character.

So, to put your graphic in the table cell, you need to click within that table cell. I find it very helpful to turn on the display of non-printing characters while doing this. (Click the Show/Hide tool in the Paragraph group on the Home tab of the ribbon.) With non-printing characters displayed, you can easily tell if there are any extraneous characters in the table cell. The only thing you want in the cell is the end-of-cell marker, which looks like a small circle with four little "tails" attached to it. If you have other text in the cell (in addition to graphic you want there), it will throw off your centering efforts.

Make sure the insertion point is just in front of the end-of-cell marker, and then insert the picture. You can make sure the graphic is inline (instead of floating) by right-clicking the just-inserted graphic to display a Context menu. Choose, from the menu, the Wrap Text option and then In Line with Text.

Now do a bit of resizing. Both your graphic and your table cell need to be sized so that the graphic fits fully inside the cell.

Now take care of your alignment by displaying the Layout tab of the ribbon. (This tab is visible when you are working inside of a table.) With the graphic selected or the insertion point otherwise located within the cell that contains the graphic, click the Align Center tool, which is in the Alignment group.

If you hover the mouse pointer over the Align Center tool, you see a ToolTip appear that explains that the tool centers text both horizontally and vertically wihin the cell. The graphic is centered because you made it inline, which means it is treated as your text is treated. The graphic should now remain centered—both horizontally and vertically—even if you resize the graphic or the cell containing the graphic.

There are a few caveats to this, and they have to do with how Word formats paragraphs. When you click the Align Center tool, Word automatically changes the paragraph alignment for the cell. (You can verify this by looking at the Home tab of the ribbon, where you'll see that the alignment indicated in the Paragraph group is changed to Center.) What it doesn't change, however, are other formatting settings such as indentation and spacing.

To correct this, display the Pareagraph dialog box. With the insertion point still in the cell containing the graphic, display the Home tab of the ribbon and click the small icon at the lower-right corner of the Paragraph group. (See Figure 1.)

Figure 1. The Paragraph dialog box.

Set the Left, Right, Before, and After controls to 0. Set the Special drop-down list to None and the Line Spacing drop-down list to Single. Click on OK to apply the settings.

In addition, the table settings can affect how a graphic is centered in the cell. Again display the Layout tab of the ribbon and click the Cell Margins tool (in the Alignment group). Word displays the Table Options dialog box. (See Figure 2.)

Figure 2. The Table Options dialog box.

Set the Top, Bottom, Left, and Right controls to 0 and feel free to clear the Automatically Resize to Fit Contents check box. Click OK, and these formatting settings are applied. Your graphic should now be exactly centered in the cell.

Finally, you should understand that the nature of your graphic itself can affect how centered it appears in your table cell. Some graphics have a transparency characteristic, which means that you can "see through" a portion of the graphic. If yours does, it may appear off-center when it really isn't. If you click once on your graphic, Word displays a thin-lined box around the graphic. It is this box which is actually centered, as it represents the boundaries of the graphic as understood by Word.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13114) applies to Microsoft Word 2007, 2010, and 2013.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Dissecting a String

VBA is a versatile programming language. It is especially good at working with string data. Here are the different VBA ...

Discover More

Crashing when Searching

If you use Excel's Open dialog box to search for files and you notice that doing so ends up crashing your system, you may ...

Discover More

Automatically Copying Formatting

It's easy to automatically set the contents of one cell to be equal to another cell. But what if you want to copy the ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Changing the Size of a Graphic

Word allows you to add more than text to your documents; you can also add graphics. Once added, you can modify the size of ...

Discover More

A Picture Is Worth a Thousand Words

Nothing beats a screen shot when you are trying to convey information about using the computer. With just a couple of easy ...

Discover More

Capturing a Screen

Windows provides a way of "capturing" the image on the screen into the clipboard. You can then paste the image from the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 8Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is three more than 5?

2016-03-16 05:39:04

Celia

Thanks, great to find someone who really understands the nuts and bolts


2016-01-04 12:31:33

Sue

This information is pure gold!!! Am on the second edition of a 175+ book with lots of tables and have suffered mightily through shapes jumping all over the page and reams of less helpful information elsewhere. Thank you!!


2015-11-09 23:48:00

ta

Cheers mate the paragraphing was spot on


2015-03-27 11:42:00

gill

Thank you very much for this article, it has helped me a lot in getting my graphic to center in my table. However I have created my graphic using Words Insert Shapes tool in another word document, and when I copy and paste it into my table am I losing resolution. Do you have any idea how to fix this problem. Thanks


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.