You've forgotten a couple of things that take up additional space - the gap the system puts in between inline-block elements and the fact that you've put a border on inner and set box-sizing to border-box.
Remove the border and set the font-size to zero and the elements will fit side by side.
<style>
* {
box-sizing: border-box;
}
#outer {
width: 700px;
height: 400px;
border: 1px solid #006669;
}
#inner {
margin-left: 99px;
margin-right: 99px;
margin-top: 49px;
margin-bottom: 49px;
width: 500px;
height: 300px;
/*border: 1px solid crimson;*/
font-size: 0px;
}
#child1 {
display: inline-block;
width: 250px;
height: 300px;
background: darkgreen;
}
#child2 {
display: inline-block;
width: 250px;
height: 300px;
background: darkcyan;
}
</style>
<body>
<div id="outer">
<div id="inner">
<div id="child1"></div>
<div id="child2"></div>
</div>
</div>
</body>
While I understand the gap part, I do not fully understand the border part as you had allowed for 2 x 1px by setting the width of each div to 249px. Is there some rounding error going on? I do often see a spurious gap of a part CSS pixel (but 1 screen pixel) between background color and border (changes with zoom) which indicates some mismatch when the system is trying to do the mapping between the several screen pixels which make up one CSS pixel on modern screens. Hopefully someone can confirm this or provide another explanation.