Dithering child elements' dimensions to fill a parent element
问题 Say I have a parent div with width 500px. It has 13 child elements that should fill its width. If I give each child element a width of 500 / 13 = 38.46... pixels, the browser will floor the pixel values, so I end up with 13 elements that take up a total of 38 * 13 = 494 pixels. There will be 6 pixels on the right side of the parent div that are not filled. Is there an easy way to dither the child element widths so that the remainder (6 pixels) is distributed among some of the child elements,