0

basic html is blow

<table class="section">
    <tr>
        <td>
            <pre><span class="Tahoma">this is a test</span></pre>
        </td>
    </tr>
</table>

basic css is below

    * {
        margin: 0;
        padding: 0;
    }
    table {
        border-collapse: separate;
        border-spacing: 0;
        table-layout: fixed;
        width: 100%;
    }
    table span {
        font-size: 12pt;
        line-height: 1;
        color: #000;
        font-weight: normal;
        font-style: normal;
        text-decoration: none;
    }
    table pre {
        margin: 1mm 1.5mm;
        display: block;;
        position: relative;
        font-size: 0;
    }

when is firefox or chrome i can get the td height to 23.5667px, but only the firefix can get the tr to 23.5667px, the chrome get the height is 24px

the decimal is impotant to me, beacuse although the chrome can't show correct width decimal px,but it can optimize it, so when has lots of div which has decimal height, chrome will show it almost correct

but if the tr is already cut the decimal, chrome can't optimize it

can any one told me how to deal with it

GilbertSun
  • 600
  • 5
  • 9
  • Is there a reason you are using points and millimetres instead of pixels or ems? – OrderAndChaos Mar 14 '14 at 07:12
  • Take a look at [this old post](http://stackoverflow.com/questions/2571035/computed-width-with-decimal-values-in-firefox-but-without-decimals-in-webkit) – Rofez Mar 14 '14 at 07:14
  • @threeandme yes, the reason i use the mm is this is for a html to pdf export, i have to use pt or mm – GilbertSun Mar 14 '14 at 07:23
  • Ah I see, then I don't think that there's anything that you can do. See @rofez post. I'd try tweaking the figures to see if you can improve the rendering that way. – OrderAndChaos Mar 14 '14 at 07:43
  • For people who think it doesn't matter, take a look at [this comment](http://stackoverflow.com/questions/19591892/chrome-dev-tools-exact-computed-value-for-css-rules#comment29099580_19591892) on one of the duplicate questions. Since printers have a higher resolution than monitors, it's important to be able to specify fractional pixels. – Mr Lister Mar 14 '14 at 15:22
  • @GilbertSun I'm not sure I understand why you're mixing mm and pt though. Those are incompatible units! Wars have been fought over them! – Mr Lister Mar 14 '14 at 15:29

0 Answers0