i have a pink colored container and inside it there are 2 divs, red and green placed side by side with display:inline-block; rule in css.i need both this divs to take 50% width so that they appear as a single div.but when i set the width to 50% the green jumps below red div.when i set width to 49% it jumps to same line but there are gaps in between which is not what i want, some body help.
i need them to stick togather in a line as if they appear as a single div. i'll put my code pen link here... http://codepen.io/ShamZ/pen/gLXBow HTML
<div class="container">
<div class="box">
</div>
<div class="box2">
</div>
</div>
css
.container{
width:800px;
height:800px;
background-color:pink;
}
.box{
display:inline-block;
width:50%;
height:50px;
background-color:red;
}
.box2{
display:inline-block;
width:50%;
height:50px;
background-color:green;
}