I have two div in the page: one in the left called "menu", the other in the right called "content", and there're two children inside the left div.
html:
<div>
<div class="menu">
<div class="menu-item">
menu1
</div>
<div class="menu-item">
menu2
</div>
</div>
<div class="content">
some content
</div>
</div>
css:
div{
border-style:solid;
}
.menu{
display:inline-block;
}
.content{
display:inline-block;
}
(jsfiddle: https://jsfiddle.net/ds81vtrp/2/)
I need to align the "menu" div and the "content" div horizontally, so I use display: inline-block, but the result is wierd that the "content" div is placed at the right of the bottom children(i.e. the "menu2" div), not the parent(i.e. the "menu" div), why?
What I need: