📜 ⬆️ ⬇️

Accurate to the millimeter

Hardly this information will be in great demand in the daily life of the typesetter, but for the sake of interest, you can sometimes pervert. So: layout in millimeters.

The first question that arises is: what can you type in millimeters? Secondly, what problems could there be with it?

The first question is simple. On millimeters it is possible to impose a business card format 90x50, which, in turn, could be printed on the printer. Said - done . For fun, I used header tags (<H *>) as block elements. Just six pieces counted.
')
Implementation problems surfaced three:

1. The opera recounts millimeter values ​​into pixels in its own way. To achieve a single-pixel frame in it, I had to pick up the values. We agreed on a width of 0.3mm.

2. Image sizes are easier to set in pixels (although, as in the case of Opera, you can pick up adequate values ​​in millimeters).

3. The printout does not display images set via the css background property. Therefore, we had to insert all the pictures into absolutely positioned blocks, and place them in the required places.

I tried to print from under Makosi and Vind. Browsers: IE (6+), Ognelis, Opera, Safari, Chrome. It seems that nowhere neither the display nor the print was buggy. Is that in the sixth IE slightly slowed down the rendering. All sources can be viewed at the link to the business card .

I do not pretend to the novelty of the idea.

Source: https://habr.com/ru/post/92946/


All Articles