My mainContainer height doesn't follow their children width
and here is my code do you have any suggestion please advise.
I need the CSS solution not JavaScript so thank in advance
<div id="mainContainer">
<div id="leftContent">
</div>
<div id="rightContent">
</div>
</div>
and here is my css
#mainContainer{
width: 1000px;
/*height: 1000px;*/
height:auto;
margin-left:auto;
margin-right:auto;
background-color: #ff6600;
padding-bottom: 20px;
}
#leftContent{
height: 100px;
float: left;
width: 380px;
background-color: violet;
}
#rightContent{
height: 100px;
float: right;
width: 620px;
background-color: yellow;
}