That is because of the gap between the two child div elements in HTML code. you need to remove the gap between the two div's to which you are giving display: inline-block
. Just remove it. It will work fine.
<div class="container">
<div class="col1">
col1
</div><div class="col2"> <!-- removed whitespace -->
col2
</div>
</div>
For more information go through this link
There are many other ways to fix this. which you can find here