Chrome 37 calc rounding

…衆ロ難τιáo~ 提交于 2019-12-01 16:00:01

After inspecting the elements it seems clear that:

1) width: 55.5px; is being rounded up to 56px and

2) width: calc(100% - 10px); - the 100% width is being rounded down to 55px

this leaves 1px left of red in the 56px wide container.

So as a work-around just simply refrain from adding a width to you remainderDiv,

and use a different method for 'filling up' the container such as overflow:hidden

FIDDLE

This way the remainder div will either be 10px or 11px - but at least the layout won't break

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!