<div style="background-color: black;width: 100%;height: 300px;margin-bottom: 30px;">
<div style="width: 30%;background-color: green;height: 100%;display:inline-block;">
ddsddsd sd sd sddsa
</div>
<div style="width: 30%;background-color: yellow;height: 100%;display: inline-block;">
</div>
</div>
I have added a small text inside the green inner DIV tag .suddenly it moved to the down. The same issue happens even when I add another div tags inside that inner div tag. If I remove that inner text then this green div tag will act normal just like that yellow tag. I am not understanding why. Why HTML is acting illogically.. I don't think this has any logical reason.. I feel like quitting HTML..