Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to design css for printing a label

Tags:

css

printing

When a user of my site clicks a "print the label" button, he is sent to a page where only the label appears on a white background and the print dialog box opens. My question is about how to "think" the css for this label so that it is printed on the full paper width, whatever paper it is (US, A4, ...).

Should I use percents for sizing everything, boxes, margins, ...? ems for fonts? or points? Should a css reset be used first?

Is there a good resource on the net for this kind of css application?

Update: I made it with floating sections and percentage widths that layout well on regular paper. So consider this question closed.

like image 633
Nicolas Cadilhac Avatar asked Oct 06 '11 13:10

Nicolas Cadilhac


1 Answers

I guess the trick is to make the layout as fluid as possible. And avoid using px as a measure. Here is one good article: CSS Design: Going to Print

like image 69
Lycha Avatar answered Sep 17 '22 13:09

Lycha