I have a 46px element, with 1px padding, and an element inside it occupying all the space.
.cool-border {
width: 256px;
height: 46px;
padding: 1px;
background: linear-gradient( 90deg, #419cfd, #00a9fe, #00b4f7, #00bde9, #00c5d6, #00cac1, #38ceac, #6ed199);
box-sizing: border-box;
}
.big-white-area {
height: 100%;
width: 100%;
background-color: white;
box-sizing: border-box;
}
<div class="cool-border">
<div class="big-white-area">
</div>
</div>
See this JSfiddle for a replicable example
With my browser (Chrome) at 100% zoom, the element looks like this:
As you can see, the bottom padding seems to be slightly thinner.
However DevTools says .cool-border
(the outer div) is exactly 46px.
DevTools says .cool-border
(the outer div) is exactly 44px.
How can I make the padding consistent?