I have a flex-container with a fractional pixel width with 8 flex-children. I expect the container to not overflow, but it does.
- The browser is Chrome or Edge on Windows. (Not in Firefox.)
- The container has width of xxx.45px.
- There are exactly 8 children; they have
flex: 1. (1-7 children works as expected.) - It only occurs on my secondary screen with screen scaling 100%, not on the primary with 125%.
The code:
.d1 {
display: flex;
overflow: auto;
height: 100px;
width: 100.45px;
}
.d1 > * {
flex: 1;
border: 1px solid blue;
}
<div class="d1">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
On Chrome and Edge I see a horizontal scollbar that I don't see on Firefox. The calculated widths are not what I expect either; the parent is 240.438px wide (I expected 240.45px) and each child is 30.063px wide (meaning the sum is 240.504px).
overflow: autobut that would cause actual legitimate overflow to be inaccessible. I want to know why the overflow occur and how to avoid it in the first place.