I have two absolutely positioned divs that I have lined up to look like an "L" or a kinked pipe. On Chrome at 100% zoom on a MacBook Pro (16-inch, 2019), it looks like this:
The issue is that as I adjust the browser zoom level, the two divs go in and out of alignment by one pixel. For example, this is what it looks like at 90% zoom:
And the same thing happens at 110% zoom. If I adjust the position by 1px, it goes back into alignment. What causes this, and is there a way to prevent it all zoom levels?
Here is a working example on codepen: https://codepen.io/elethan/pen/gOLQXrB
CSS:
#outer-container {
width: 200px;
height: 40px;
background: gray;
padding: 10px;
position: absolute;
top: 50%;
right: 50%;
}
#progress-bar {
background: purple;
height: 40px;
width: 80%;
border: 4px solid gray
}
#down {
background: purple;
height: 40px;
width: 40px;
border: 10px solid gray;
border-top: 0 solid transparent;
position: absolute;
left: 124px;
top: 54px;
}
HTML:
<div id="outer-container">
<div id="progress-bar"></div>
<div id="down"></div>
</div>


