Here is my problem: JSFiddle
I have a table within a div, the div is 50% wide. The table should fill 100% of the width of the div.
<div> <table> <tr> <td>Resize and see Pixel to the right -></td> </tr> </table> </div> The CSS:
div { width: 50%; background: red; } table { width: 100%; background: rgb(255,255,255); } It basically works, but when you resize the browser, you sometimes can see the background of the div. It's because the div's width won't be rounded, but the table's width will.
For example: If the div is 315.5px wide (because of the 50% width), the table only inherits a width of 315px for its width. The browser then rounds up the div to 316px and causes the div to be 1px wider than the table. This bug only occurs to me in Chrome.
How can I fix this?