473,385 Members | 2,004 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,385 software developers and data experts.

setting up CSS for printing

I need to setup a printable query results page. So far I've been using trial
and error settings in CSS. I'm sure there's a better way. How can I do
things like 1/2" margins all around and my table 100% width within those
boundaries. Then things like row heights of 3/8" or columns 1" wide.

How do I effectively translate pixels and resolutions into inches I guess?

thanks
Jul 20 '05 #1
9 3097
"Shank" <sh***@tampabay.rr.com> wrote:
I need to setup a printable query results page.


So you said in alt.html, the advice you got there was correct and still
applies. Not liking a reply is not an excuse for multi posting.

--
Spartanicus
Jul 20 '05 #2
Shank wrote:
I need to setup a printable query results page. So far I've been using trial
and error settings in CSS. I'm sure there's a better way. How can I do
things like 1/2" margins all around and my table 100% width within those
boundaries. Then things like row heights of 3/8" or columns 1" wide.

How do I effectively translate pixels and resolutions into inches I guess?


Use a print style sheet, and use inches as your unit, as they are in the
CSS spec.

http://www.w3.org/TR/CSS21/syndata.html#length-units

body { margin: 0.5in; }

--
Mark.
http://tranchant.plus.com/
Jul 20 '05 #3
On Fri, 8 Oct 2004, Mark Tranchant wrote:
Use a print style sheet, and use inches as your unit, as they are in the
CSS spec.
So are centimetre (cm) and millimetre (mm). It's time to change to
the metric system, which has been adopted in the USA in 1866 already.
<http://www.metric.org/>
body { margin: 0.5in; }


body { margin: 0 }
is a better idea for a print style sheet, IMHO. The BODY margin will be
_added_ to the margin you specify under "Page Setup". Having "margin: 0"
in the style sheet, leaves you more room on the paper.

--
M. Pirard strikes again:
<http://www.alltheweb.com/search?q=don1t&_sb_lang=any>
<http://www.altavista.com/web/results?q=don1t&kgs=0&kls=0>

Jul 20 '05 #4
On Fri, 8 Oct 2004 17:23:37 +0200, Andreas Prilop wrote:
So are centimetre (cm) and millimetre (mm). It's time to change to
the metric system, which has been adopted in the USA in 1866 already.
<http://www.metric.org/>


What have you got planned for National Metric Week? (Oct 10-16)

Time to whoop it up, big time..

I am not sure when Australia changed to metric, but it
was when I was young, so luckily I am largely metric'd
myself. This is fortunate because I love to trawl NASA's
site for arcane information on the planets, asteroids etc.,
and they have used metric measurements (mostly) since at
least the early 1970's.

There was an article in National Geographic on the planets of
the solar system. A reader objected to the use of metric units
of meaurement and NASA's response was words to the effect of
'we use metric, get used to it'. ;-)

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 20 '05 #5
Andrew Thompson wrote:
the solar system. A reader objected to the use of metric units
of meaurement and NASA's response was words to the effect of
'we use metric, get used to it'. ;-)


And yet NASA lost a spacecraft because one of their
engineers assumed inches/feet/etc. when the specification
did not say and other engineers assumed metric.
--
Wes Groleau
Alive and Well
http://freepages.religions.rootsweb.com/~wgroleau/
Jul 20 '05 #6
On Sat, 09 Oct 2004 19:15:50 -0500, Wes Groleau wrote:
Andrew Thompson wrote:
[ Trimmed, re-instated ]
(NASA - units of measurement)
..they have used metric measurements (mostly)..

... And yet NASA lost a spacecraft because one of their
engineers assumed inches/feet/etc. when the specification
did not say and other engineers assumed metric.


That is not how I heard it, NASA was always after metric,
but an external contractor assumed the old measurements.

Mind you, it was ultimately NASA's responsibility to check
that everyone was on the same measuring stick..

Hence the '(mostly)' which you trimmed. Gotta' focus on
details Wes. Distinctions like that can make the difference
between inches and millimetres. ;-)

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
Jul 20 '05 #7
Andrew Thompson wrote:
That is not how I heard it, NASA was always after metric,
but an external contractor assumed the old measurements.


I can't be dogmatic on who did what, but as the story came
to me, the units were not stated in the specification.

--
Wes Groleau
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
^ A UNIX signature isn't a return address, it's the ASCII equivalent ^
^ of a black velvet clown painting. It's a rectangle of carets ^
^ surrounding a quote from a literary giant of weeniedom like ^
^ Heinlein or Dr. Who. ^
^ -- Chris Maeda ^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
Jul 20 '05 #8
Wes Groleau wrote
as the story came to me, the units were
not stated in the specification.


You were misinformed. NASA used and specified metric units. The
subcontractor (Lockheed) failed to follow the specification and
delivered non-metric units.

Quote from official report
******************************
http://www.hq.nasa.gov/office/codeq/...mib_report.pdf
"the root cause for the loss of the MCO spacecraft was the failure to
use metric units... of Newton-seconds (N-s). Instead, the data was
reported in English units of pound-seconds (lbf-s). ... The SIS
[Software Interface Specification], which was not followed, defines
both the format and units"
******************************
Jul 20 '05 #9
"Pat Norton" <pa********@iname.com> wrote in
comp.infosystems.www.authoring.stylesheets:
You were misinformed. NASA used and specified metric units. The
subcontractor (Lockheed) failed to follow the specification and
delivered non-metric units.


And NASA failed to check up on its supplier because ...

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: C A Upsdell | last post by:
I have a site where I am setting a style dynamically, using the JS statement: obj.style.backgroundImage = 'url(img/bak_page.jpg)'; where 'obj' is either document.getElementById(id), or...
0
by: DotNetDummy | last post by:
Hi all, I am trying to set the printing setting e.g duplex mode etc. on a default printer when I.E object started printing a particular html doc. Here's the partial code, any help would be...
1
by: PMB | last post by:
Thank you in advance for any and all assistance. I'm trying to take 4 fields and space them evenly on a receipt printer. My problem is there are many variables, i.e. Qty may be one or two...
1
by: Rainbow | last post by:
Hi, I tried to change the print setting by PrintDialog dlg = new PrintDialog(); dlg.AllowSomePages = true; dlg.AllowSelection = true; dlg.Document = pd; dlg.PrinterSettings.MinimumPage = 1;...
2
by: John Smith | last post by:
Hey folks, I'm trying to print from a c# windows application using System.Drawing.Printing. My problem is that it doesn't matter what I put in for papersize, it always ignores what I tell it...
1
by: Fred Nelson | last post by:
I'm a newby and I'm writing my first VB.NET print program! I need to change the default left and right margins for my printed output "e" is my "System.Drawing.Printing.PrintPageEventArgs By...
5
by: Fred Nelson | last post by:
Hi: I'm trying to write a program that will print envelopes using a HP Laserjet 4 that has three trays. In the future this program will work with other printers so I don't want to "hard code"...
4
by: NASAdude | last post by:
I'm working on distributing a database using VS Tools for Office, and am having trouble with linked images on forms/reports. The image objects have a default path\file set on the .Picture property,...
2
by: chyogesh76 | last post by:
i created a report in crystal report i am using it in vb6.0. while printing through vb it was printing in a4 size but i want make it custom size(small size 5'' X10"). how can i do. any one please...
2
by: rlntemp-gng | last post by:
Re: Access 2003 My client has a printer that can print single-sided or double-sided. The default settings for this printer in Windows is double-sided printing for the bulk of their work. ...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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.