Remove Space when printing webpage - Setup in Print.css

axessJosh used Ask the Experts™
I am trying to customize a print layout from a wordpress website so that a user can print the content in a convenient layout.  I've got most of the page working the way I'd like but can't figure out a final piece.  It is a margin space between the header and content area of the page.

The site utilized Bootstrap for mobile responsiveness so I'm not sure if that's causing some of the issue, but here is a link to a sample page.

If you click the "print this information" button, you can see in the print preview how there is a gap of white space between the top logo and the content below.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®


This may be specific to Chrome print preview.
Hi you can use Bootstrap helper

Just add this class to your div if you want to hide it from print

Open in new window

this div seems to be the culprit
<div class="no-header-image __web-inspector-hide-shortcut__"></div>

Open in new window

refer to this CSS
.fw-absolute-header section.password-protected-section, .fw-absolute-header .no-header-image {
    padding-top: 125px;

Open in new window

or you can create a specific CSS file and add specific size, width color anything... for printing only.

the link should have media="print"
<!-- print -->
 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"/>

Open in new window

Create a file print.css and place it in the css folder.


everything need to be place between

 @media print { 

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial