Fix Word Table Borders Extending Beyond Page Margins
Question details
The user needs to align table borders perfectly with the document's page margins, as the tables currently extend slightly beyond the margins even after applying the AutoFit to Window option.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Creating or editing tables in a Word document and attempting to format the table width to match the page layout.
- Observed behavior
- The table borders appear slightly wider than the standard page margins instead of aligning with them, a behavior tied to legacy document compatibility modes.
Ensure your document is fully updated and check the title bar at the top of the window to see if '[Compatibility Mode]' appears next to your file name, as this legacy mode is the most common cause of margin alignment issues.
Convert Document to the Latest .docx Format
Updating the document's file format changes the layout engine to the modern standard, ensuring table borders align correctly with page margins rather than pushing into them.
In versions of Word prior to 2013, the layout engine intentionally extended table borders into the margins so that the actual text inside the table would align perfectly with the standard document text. Modern versions of Word (2013 and newer) changed this behavior to align the borders themselves with the margins.
If you are opening an older .doc file or working in Compatibility Mode, Word will revert to the old layout rules, causing the borders to look too wide.
Click on 'File' in the top-left corner of the Word interface, then select 'Info' from the left-hand navigation menu.
Look for the 'Compatibility Mode' section and click the 'Convert' button. This will update the document to the newest layout standards.
Save the document as a standard '.docx' file. Re-apply the 'AutoFit to Window' option to the table and verify if the table borders now align properly with the page margins.

Adjust Table Properties and Preferred Width Manually
If the document is already in the latest format and not in compatibility mode, the table might have fixed width settings or custom cell margins overriding the page layout.
Easily Manage Table Layouts with WPS Writer
WPS Writer provides an intuitive and modern layout engine that seamlessly handles table borders and margins, ensuring your tables perfectly align without compatibility mode headaches.
- 1. Open your document: Launch WPS Writer and open the document containing the misaligned tables.
- 2. Access Table Tools: Click anywhere inside the table to automatically reveal the 'Table Tools' tab on the top ribbon.
- 3. Apply AutoFit: Click the 'AutoFit' dropdown button and choose 'AutoFit to Window' to instantly align your table borders perfectly with the document margins.

Frequently Asked Questions
Why does AutoFit to Window not work in older Word documents?
In older .doc formats or Compatibility Mode, Word uses a legacy layout engine that pushes borders into the margins to align the cell's internal text with the page's body text. AutoFit respects this legacy engine until the document format is officially converted to a newer standard.
Can I manually drag the borders to fit the margins?
Yes, you can manually adjust the table using the ruler at the top of the document. However, if the table is set to a specific preferred width or is bound by compatibility mode rules, it might snap back into the margins or fail to align perfectly on both sides.
Will converting my document to .docx change other formatting?
Converting a document updates it to the latest Microsoft Word layout standards. While most standard text remains intact, minor layout shifts can occur, especially with complex nested tables, strict text wrapping, and older WordArt elements.




