Formatting Issues

How to Put a Page Border Around a Header in Microsoft Word

Nimra MalikNimra Malik Nov 14, 2026 868 views

Question details

The user wants a box page border that surrounds the header in a Word document.

How to Put a Page Border Around a Header in Microsoft Word
Product
Microsoft Word
Device & OS
not provided
Scenario
A DOCX document needs a page border that includes the header, either throughout the document or in a specific section.
Observed behavior
The border may not surround the header, or the relevant option may appear cleared, when the border is measured from the wrong reference point.
Before you start

Open the DOCX file in Word and identify whether the border should apply to the entire document or only one section. If you need a section-specific border, click within that section before opening the border settings.

Solution 1Recommended

Measure the Word page border from the text area

Use the page border options to create a box around the header and apply it to the desired part of the document.

1
Open page borders

In Word, go to Design > Page Borders to open the Borders and Shading dialog box.

2
Choose a box border

On the Page Border tab, select Box under Setting, then choose the line style, color, and width you want.

3
Measure from text

Click Options, set Measure from to Text, and select Surround header if that option is available. Click OK to return to the border dialog box.

4
Apply the border

Under Apply to, select Whole document or the appropriate section, then click OK.

5
Check the layout

Review the header and border in Print Layout. If spacing needs adjustment, go to Layout > Margins and choose a preset or Custom Margins.

Measure the Word page border from the text area
Section-specific borders: The section choices under Apply to depend on the sections in your document. Place the cursor in the intended section before applying its border.
Free Microsoft Office alternative

Work with Word documents in WPS Writer

WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Word documents. Its DOCX support makes it easy to move files between WPS Writer and Microsoft Office; check page borders and header layout after opening a document.

Open and edit Microsoft Word DOCX and DOC files.Work with document headers and page formatting in WPS Writer.Use a familiar interface for a smoother transition from Microsoft Office.Get a free, lightweight office suite for everyday document work.
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't my page border surround the header?

In Word, go to Design > Page Borders > Options and check Measure from. Select Text, then select Surround header if available.

Can I add the border to just one section?

Yes. Click in the section, open Design > Page Borders, and choose the appropriate section under Apply to before clicking OK.

How do I change the space around the border?

Open Design > Page Borders > Options to adjust the border distances. You can also use Layout > Margins > Custom Margins to change the document margins.

Can WPS Writer open the bordered Word document?

Yes. Open the DOCX file in WPS Writer, then review the header and page border layout because formatting may differ between applications.