Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

not centering data on printer

  • 2 replies
  • 1 has this problem
  • 4 views
  • Last reply by Col_Boogie

more options

see https://americasfreedompressalliance.us/Howard/Demo/hmorris/2013CalB.html When I print preview the file I lose data on the right and data not centered. Used @media print, options seemed to be ignored - can use view source all self contained. using relative width of media which seems to be ignored. Yes, Shrink to fit helps, but that leaves too much space on the bottom of page. Works with MS Edge.

see https://americasfreedompressalliance.us/Howard/Demo/hmorris/2013CalB.html When I print preview the file I lose data on the right and data not centered. Used @media print, options seemed to be ignored - can use view source all self contained. using relative width of media which seems to be ignored. Yes, Shrink to fit helps, but that leaves too much space on the bottom of page. Works with MS Edge.

All Replies (2)

more options

I'm assuming this is your website.

Firstly, in the print rules you have set your content width (.Main) to a fixed width of 7.5in. It's poor practice to set a fixed width when printing, since it limits how the browser is able to adapt your content to fit the page. It should be width: 100%; instead.

This issue is coupled with the fact that the print rules for the .Main element is not removing the padding from the left and right of the page content. This would be done by adding padding:0; to the rule.

Essentially, because you have set the content to be 7.5 inches wide with 1 inch on either side, the document is 9.5 inches wide. Setting the printing scale to 100% means that trying to print on paper less than 9.5 inches wide is going to cause content on the right side to overflow off of the page.

The reason you are seeing a lot of whitespace on the Fit to page option is because Firefox is still trying to print the 1 inch padding on either side of the content. So you are printing an extra 1 inch of space on either side, plus whatever margins your printer has set.

So your CSS rules for the print media query needs to be:

.Main {
    width: 100%;
    padding: 0;
}

Hope this helps.

Modified by Wesley Branton

more options

I changed it to margin:.5in and it works the one inch on either side was for screen only, not print style for screen should not apply to print