473,388 Members | 1,209 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

printer margin in css

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
5 8673
"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
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Paul White | last post by:
I've written a POS system for a client, but we're having problems with the customer receipt printing. The printer has a left margin gap of about 1 inch. I need to reduce that left margin width in...
1
by: Alejandra Parra | last post by:
In my code, I print a dataSet ' get grid's PrintDocument object Dim pd As System.Drawing.Printing.PrintDocument pd = flexgrid.PrintParameters.PrintDocument() ' set up the page (landscape, 1.5"...
0
by: cnlai | last post by:
I used Panasonic printer KX P-1124 to preview 2 MS Access reports. In one preview, the left margin was adjusted (I supposed it was the unprintable region); the right margin remained what I set. ...
5
by: trint | last post by:
How can I send files straight to a printer from my c#.net app? I also must include the margin's, trays and the stapler. Thanks, Trint
2
by: Lighting_dragon | last post by:
Hi. I try to get the printable area of the printer (Margins). I have used Defaultpagesettings.Printersettings.Margins.Top, .Left, .... But it didn't give the true values. Posted Via...
3
by: Michael | last post by:
Hi, I'm trying to print barcodes to the Dymo LabelWriter printer. Put everytime I send a job to the label printer it just outputs an empty label. If I change the default printer back to the...
2
by: Anne DeBlois | last post by:
Hi, In VB 2005, I need to get the printer's left most and top most margin that a selected printer can prit to on a piece of paper, so I can adjust the PrintDocument classes to get as uniform as...
7
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change...
1
by: tbanov | last post by:
Hi, I'm looking to create my own version of a printer-friendly page. Any resources I can find on this subject are extremely specific about what they consider "printer-friendly", and they don't...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.