logo
search
Formatting Issues

How to Set a Fixed Width in Word Web Layout

Ayan MasoodAyan Masood Oct 23, 2026 868 views

Question details

The user wants to apply a fixed width to content while using or exporting from Word's Web Layout view, which typically scales dynamically.

How to Set a Fixed Width in Word Web Layout
Product
Microsoft Word
Device & OS
not provided
Scenario
Creating web pages or HTML templates and trying to prevent the text from wrapping to the full size of the browser window.
Observed behavior
Word's Web Layout view adjusts content dynamically to the window size and does not preserve fixed printed or webpage dimensions natively.
Before you start

Since Word's Web Layout is inherently designed to stretch content to fit the viewing window, you will need to either contain your text within a table or edit the exported HTML code directly to enforce a fixed width.

Solution 1Recommended

Modify the Exported HTML Code using Notepad

The most precise method to enforce a fixed web width is to save the Word document as a web page and wrap the content in a fixed-width HTML div element.

Microsoft Word is primarily a word processor and not an optimized HTML editor. Exported HTML code from Word can be complex, but manually adding a fixed-width container can force the layout to stay at a specific dimension when viewed in a browser.

1
Save Document as HTML

Open your document in Microsoft Word, go to the File menu, and select Save As. Choose 'Web Page (*.htm;*.html)' from the file format dropdown and save the file.

2
Open the File in a Text Editor

Locate the newly saved HTML file on your computer, right-click it, and select 'Open with' > 'Notepad' (or another plain text editor).

3
Insert the Opening Container Tag

Use the search function (Ctrl + F) to locate the opening <body> tag. Immediately after this tag, type or paste the following code: <div align="center" style="width: 600px"> (you can change '600px' to your preferred width).

4
Insert the Closing Container Tag

Scroll to the very bottom of the document or search for the closing </body> tag. Immediately before it, type </div> to close the container.

5
Save and Test

Save the changes in Notepad. Open the HTML file in a web browser to verify that the content is now constrained to the fixed width.

Modify the Exported HTML Code using Notepad
Seamless Document Layouts

Easily Manage Print and Web Layouts with WPS Writer

WPS Writer offers an intuitive interface to seamlessly switch between Web and Print layouts, efficiently manage fixed-width tables, and cleanly export your documents to HTML.

  1. 1. Switch Viewing Modes: Open your document in WPS Writer. Go to the View tab and select 'Web Layout' to see how your text wraps dynamically.
  2. 2. Constrain with Tables: Navigate to the Insert tab, select Table, and insert a container. Right-click it, go to Table Properties, and set a fixed 'Preferred Width'.
  3. 3. Export as Web Page: Click the Menu button, select 'Save As', and choose 'HTML Document' from the file types to export your layout.
Easily toggle between Web Layout and Print Layout with one clickInsert and strictly format fixed-width tables to organize contentClean HTML export for web publishing and sharingFully compatible with Microsoft Word document formats (.docx)
microsoft office alternative - wps office

Frequently Asked Questions

Why does Word Web Layout stretch my text across the whole screen?

Web Layout view is designed to mimic how a web browser displays content, meaning it automatically wraps text to fit the current size of your application window rather than conforming to the fixed physical page margins found in Print Layout.

Can I use Microsoft Word to design responsive HTML emails?

While you can export Word documents as HTML, the generated code contains lots of proprietary markup that does not render consistently across email clients. For reliable and responsive email templates, it is strongly recommended to use a dedicated platform like Mailchimp.

How do I switch back to normal page view in Word?

To return to the standard document view where you can see physical page edges and margins, navigate to the 'View' tab on the ribbon and click on 'Print Layout'.