/    Sign up×
Community /Pin to ProfileBookmark

Setting Print Margins

I have a page that i want the margins to be set to 0 for everything, and .1 inches for the left. I know I can change it in the page setup; however, I wish to have ti always be the above settings. Here is what I have in my .css file:

[code]
.omit{display:none;}

@media print {
body {
margin-right:0inches;
margin-top:0inches;
margin-bottom:0inches;
margin-left:.1inches;
}
}
[/code]

Is that even close to being right? When I load the page and go to page setup, the numbers are all whacked up, aka, they are not 0,0,0, and .1.

to post a comment
CSS

5 Comments(s)

Copy linkTweet thisAlerts:
@FangMar 03.2009 — It won't set the printer margins, only the document body margins.
Copy linkTweet thisAlerts:
@dzirkelbauthorMar 03.2009 — That may still work...the IE session defaults to 0's on this one computer (ony computer that will be using this). So, if I make the body default different, then it would print different right?

Right now, with everything at 0's, the left gets cut off a little bit.
Copy linkTweet thisAlerts:
@FangMar 03.2009 — .1in is very small for a margin, try a larger value.
Copy linkTweet thisAlerts:
@dzirkelbauthorMar 03.2009 — I'm printing on a 2x1 label, so .1 is exactly what I need.
Copy linkTweet thisAlerts:
@FangMar 03.2009 — Is the label alignment correct?

Does a plain text print correctly?

Have floats, margins and padding been reset?
×

Success!

Help @dzirkelb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...