Jump to content

Change default IE page margins for printing?


pnj

Recommended Posts

I'm setting up a web application to print labels to a specialized label printer.  The challenge is that Internet Explorer (among other browsers) wants to set top and bottom margins to 0.6", which is not so ideal when the label is only 2" wide to begin with.

 

This is a browser setting that CSS can't affect, so I'm expecting to tell the user to change his Page Setup to minimal margins for printing.

 

The problem is IE doesn't seem to save Page Setup.  Even between Page Setup and Print, it seems to forget the changes you made - the only way to have it print is to go Print Preview, then Page Setup from the Preview screen, and THEN print from the preview screen.

 

Looks like a browser bug, but I can't find any information on this online.  Any ideas on how to make IE use a different default margin setting for printing?  Unfortunately I have to use IE6 because that is what the client is using.  Maybe the bug is already fixed in IE7...

 

I realize its not really a "phpfreaks" question, but maybe you can direct me to an active IE forum where someone is likely to know?

 

Cheers

-pnj

Link to comment
Share on other sites

The following gets the text all the way into the upper-left-hand-corner for me on both FF and IE:

<html>
<body style='margin:0px;padding:0px;'>
<h3 style='margin:-4px 0px;padding:0px;vertical-align:top;'>Some Text...</h3>
</body>
</html>

Hope that helps.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.