Forum How do I...?

Use pixels with a decimal

Dumpen
As the subject suggest, I was wondering if it's possible setting a width/height on a element using decimals. Eg. 10.558.

Currently it seems Prince is rounding it up or down.

<div style="width: 10.558px;">
</div>


Expected result:
<div style="width: 10.558px;">
</div>


Result:
<div style="width: 11px;">
</div>


We are using Prince 7.1. Other alternative solutions are always appreciated.

Edited by Dumpen

mikeday
Hmm that should work fine actually, there is nothing special about px units in Prince. If you apply a border or background color then you can run with --no-compress you can look at the generated PDF file and see exactly how big the box is in point units (1/72 of an inch).
Dumpen
Sorry, it seems the problem stems from my code and not Prince itself. I'll have a second look at what goes wrong in my end :-)