I've got a webpage with a div fully filling up another div.
<div id="outer">
<div id="inner"/>
</div>
The style is as follows:
#outer {
background: blue;
border: 1px solid red;
height: 44px;
width: 44px;
}
#inner {
background: yellow;
border: 1px solid green;
height: 42px;
width: 42px;
}
Feel free to check out the corresponding codepen.
In Firefox this renders fine. In Chrome the background of the outer div shows because it renders as too large. In addition, the border is too far away. Here are the renderings.
See the extra blue rim on the bottom and right for Chrome (left) that's not present for Firefox (right). Why is this? And how can I prevent it? (I'm guessing it has something to do with Chrome rounding off pixels when scaling? Is Codepen scaling its output or something?)