CSS calc() rounding

Anorionil picture Anorionil · Sep 19, 2014 · Viewed 9.3k times · Source

This problem is similar to Chrome 37 calc rounding

But the real problem was a bit more complicated, and the solution provided doesn't work for this case:

Result in Chrome: http://i.imgur.com/vNvFfHC.jpg

To explain a bit more: The width of the outerDiv is dependant on random amount of text, which is in another div which is also inside the outerDiv. The left and right divs contain an image, so their width is static.

The current solution we have is to change the calc to: calc(100% - 40px + 1px); Is there any better solution?