I am facing an issue where I have an input element with width: calc(100% - 100px);
and no padding/margin/border. Next to this input, I want to place a div with position: inline-block;
and width: 100px;
.
The problem is that the div is going to the next line instead of staying beside the input. When I reduce the width of the div to 96px, it works fine. I am puzzled about what could be causing this missing 4px width!
It's important to note that the issue does not seem to be related to box-sizing: border-box
, as there is no padding or border involved.
You can check out the Plunker link for testing in Chrome and Firefox.