设置CSS进行打印 [英] setting up CSS for printing

查看:138
本文介绍了设置CSS进行打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要设置一个可打印的查询结果页面。到目前为止,我一直在使用试用版

和CSS中的错误设置。我确定有更好的方法。我该怎么做

这样的事情比如1/2四周边缘和我的桌子100%宽度在那些

边界内。然后像行高度3/8之类的东西或第1列我觉得如何有效地将像素和分辨率转换成英寸?


谢谢

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

推荐答案

" Shank" < SH *** @ tampabay.rr.com>写道:
"Shank" <sh***@tampabay.rr.com> wrote:
我需要设置一个可打印的查询结果页面。
I need to setup a printable query results page.




所以你在alt.html中说,建议你到那里是正确的仍然

适用。不喜欢回复不是多次发帖的借口。


-

Spartanicus



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


Shank写道:
我需要设置一个可打印的查询结果页面。到目前为止,我一直在使用CSS中的试用版和错误设置。我确定有更好的方法。我怎么能做像1/2这样的事情。边缘四周,我的桌子在这些边界内100%宽度。然后像行高度3/8之类的东西或第1列我猜怎样才能有效地将像素和分辨率转换成英寸?
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?




使用打印样式表,并使用英寸作为你的单位,因为它们在

CSS规范中。

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


体{margin:0.5in; }


-

Mark。
http://tranchant.plus.com/


2004年10月8日星期五,Mark Tranchant写道:
On Fri, 8 Oct 2004, Mark Tranchant wrote:
使用打印样式表,并使用英寸作为单位,因为它们在
CSS规范中。


所以是厘米(cm)和毫米(mm)。现在是时候改为

公制系统,该系统已于1866年在美国采用。

< http://www.metric.org />

body {margin:0.5in; }
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}

对于打印样式表更好,恕我直言。 BODY保证金将是您在页面设置下指定的保证金。
_added_。在样式表中有margin:0

,可以在纸上留出更多空间。


-

M. Pirard再次罢工:

< http://www.alltheweb.com/search?q = don1t& _sb_lang = any>

< http:// www.altavista.com/web/results?q=don1t&kgs=0&kls=0>



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>


这篇关于设置CSS进行打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆