I am attempted to have set two div elements within another div to be alongside each other.
The css I currently have sets the two divs to be display: inline-block;
with the width
elements of the two divs adding up to 100%, thereby filling the whole parent , however this causes the two divs to stack, rather than appear next to each other.
Applying a float: left
to one of the elements will cause them to appear alongside each other, as will changing the sum of the width
to be <100% (i.e. 39% and 60%)
My question is what causes the divs to stack, and need to be floated? Is there some buffer I can't see that prevents you from having two divs that add up to 100% inside another one?
Below is an example of the problem. https://jsfiddle.net/q1g9z1o4/