By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,012 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

printer margin in css

P: n/a
How do I design the printers margins in css, so the user doesn't have
to change the margins in print preview? So the site looks the same on
the printer as on the screen.

Jul 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"thomas hygum" <hy***@tigerensrede.dk> wrote:
How do I design the printers margins in css, so the user doesn't have
to change the margins in print preview?
You don't. It might be argued that the best margin is no margin (which
means explicitly setting <html> and <body> margins and paddings to zero),
because then you don't add anything to margins that the user has specified
for printing in general. But some small margins, like those we usually use
on screen (like 0.5em or 1em on the left), probably don't disturb much, and
the improve the situation in case the user has set zero margins for some
odd reason.
So the site looks the same on
the printer as on the screen.


Can you tell me what size my screen is, and my printer's paper?
I'm pretty sure you already know that the resolutions are different.
And it's probably no surprise that people typically use color screens but
very often print using a black and white printer. So how _could_ they be
the same? Besides, why _should_ they? What's great in CSS is that you can
make things _different_ in different environments.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 21 '05 #2

P: n/a
Tim
"thomas hygum" <hy***@tigerensrede.dk> wrote:
How do I design the printers margins in css, so the user doesn't have
to change the margins in print preview?
"Jukka K. Korpela" <jk******@cs.tut.fi> posted:
You don't. It might be argued that the best margin is no margin (which
means explicitly setting <html> and <body> margins and paddings to zero),


I'd leave printing alone, but on-screen margins help with readability.
Some browsers do jam the text along the window borders, with what looks
like no gap, at all, between the text and the edge.
So the site looks the same on the printer as on the screen.


I think most people will have systems like mine, where the page is entirely
different dimensions than the screen. Both in aspect ratio, and the amount
of text that can fit across it.

Then there's the situation where do you really need to clone the page, or
just print the information that they'll be wanting (e.g. just the article
content of the page, and omitting all the navigational gumph).

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 21 '05 #3

P: n/a
I want the same look on every machine because what I want to print is
labels on a special label-paper, where the text has to be precisely
located. I want to do it in php because the texts come from a database.

And I can predict the outcome on every screen, because the only margins
I want to control is top and left, which is nearly always the same. If
I wanted to control all four margins it were something else.

Jul 21 '05 #4

P: n/a
"thomas hygum" <hy***@tigerensrede.dk> wrote:
I want the same look on every machine because what I want to print is
labels on a special label-paper, where the text has to be precisely
located.
So you are not authoring for the WWW (which is what we discuss here), are
you?
And I can predict the outcome on every screen,


Then you need to study all screens and all browsers used and their
settings, in every detail. But that's not about WWW, is it?

P.S. It is recommendable and customary to quote or paraphrase previous
discussion when posting a followup.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 21 '05 #5

P: n/a
JRS: In article <Xn*****************************@193.229.0.31>, dated
Wed, 2 Feb 2005 05:01:28, seen in news:comp.infosystems.www.authoring.st
ylesheets, Jukka K. Korpela <jk******@cs.tut.fi> posted :

P.S. It is recommendable and customary to quote or paraphrase previous
discussion when posting a followup.


But he's a Google user, and probably does not know how to.

ISTM that the newsgroup FAQ could give guidance or a pointer to
guidance, either at the tail of A.4 after the RFC1855 reference
paragraph or in A.7a maybe.

If it covers the matter, something like
Replies via Google :
see <http://www.cs.tut.fi/~jkorpela/internet/index.html#anka>
might suffice.
Via sig line 3 :
Chris Croughton posted :
Keith Thompson wrote in comp.lang.c, message ID <lnwtuhfy7d.fsf@nuthaus.
mib.org> :-
If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.
Guidance on posting via Google with indentation would also be welcome.

A.7 could also observe that proper NNTP services and newsreaders are
better than Web services, and mention news.individual.net.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME
Web <URL:http://www.uwasa.fi/~ts/http/tsfaq.html> -> Timo Salmi: Usenet Q&A.
Web <URL:http://www.merlyn.demon.co.uk/news-use.htm> : about usage of News.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 21 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.