In the below code there are 2 child div elements .left and .right. Im using margin left to move the .right to the right and im using display inline block to make the div the size of the content and I thought that would help with getting the divs to align to the top of each other. the one on the right appears lower. why?
<style type="text/css">
html,body{
color:#fff;
}
.container {
background: linear-gradient(
to right,
#ff9e2c 0%,
#ff9e2c 50%,
#b6701e 50%,
#b6701e 100%
);
height: 500px;
width: 100%;
}
.left{
width:40%;
padding: 10px;
vertical-align: top;
}
.right{
margin-left: 50%;
padding: 10px;
width: 40%;
vertical-align: top;
}
</style>
<section class="container">
<div class="left"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sed, consequuntur.</div>
<div class="right">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolor similique exercitationem reiciendis doloribus animi cupiditate laborum, mollitia ipsum ad? Perspiciatis?</div>
</section>