I'm trying to display some divs side by side using the css property display:inline-block;
for the children and position:relative
for the parent/container as described in the code below :
<div style="margin-top: 20px; position: relative;">
<div style="margin: 15px; border: solid 2px; width: 130px; height: 130px; padding: 10px; text-align: center; display:inline-block;">
test test test
</div>
<div style="margin: 15px; border: solid 2px; width: 130px; height: 130px; padding: 10px; text-align: center; display:inline-block;">
test test test test test test test test test test test test test test test test test test
</div>
<div style="margin: 15px; border: solid 2px; width: 130px; height: 130px; padding: 10px; text-align: center; display:inline-block;">
test test test
</div>
<div style="margin: 15px; border: solid 2px; width: 130px; height: 130px; padding: 10px; text-align: center; display:inline-block;">
test test test
</div>
</div>
But the result was different when one of the those divs contain a long text
What's the explanation of this.