473,569 Members | 3,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 8681
"thomas hygum" <hy***@tigerens rede.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***@tigerens rede.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.tu t.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***@tigerens rede.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.infos ystems.www.authoring.st
ylesheets, Jukka K. Korpela <jk******@cs.tu t.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.c om, 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.demo n.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
4571
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 order to prevent wrap-around. I have looked up the printer on the web and found a manual for it which describes the printer escape sequences to...
1
1759
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" left margin) With pd.DefaultPageSettings ..Landscape = False ..Margins.Left = 50 Dim a As New Printing.PaperSize("Carta", 850, 1100)
0
1254
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. In another preview, the left margin was adjusted as above; however the right margin was also adjusted (the unprintable right margin was set to 0)....
5
10142
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
2995
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 Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **...
3
14994
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 standard printer(HP LaserJet), it prints fine. Has anyone worked with Label printers like this. Here is the code I'm using: Private Sub...
2
1834
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 possible a printout no matter which print driver is selected. How do I get (and then set) this information in VB? Thank you so much in advance,
7
20691
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 printer's physical margins using VB coding? Cheers -- Osmotion Blue
1
1678
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 address my issue. It seems to be browser specific, but I want to get rid of whatever extra is printed in the top and bottom margins. Printed from IE, the...
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7930
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.