Decimal places in CSS percentage

There are probably many solutions for your problem, I would suggest these:

  1. Round on 2 decimals by yourself for all but one, than reduce from total width for last one.
  2. Use table or display: table, than the browser will fix the widths by itself.

For anyone coming upon this question, this article goes into depth about what different browsers do for percentages with decimal points: https://cruft.io/posts/percentage-calculations-in-ie/

As for which browser is correct, according to that article:

The HTML5 Specification doesn’t mention truncating or rounding decimal places. Point 11 deals with decimal places, and says to keep looping until “position is past the end of input, then return value as a length”.