The Obective here: Get column 2(skyblue) and column3(salmon) to float inside it's wrapper(green). The first column(lightgreen) is floated to the left, the second column(skyblue) is float left, and the third column(salmon) is floated right. What am I doing wrong here? Why are they sitting underneath my wrapper? I tried clear fixes and expanding the wrapper and can't get these columns to sit inside the container. Suggestions?
Demo - http://codepen.io/Chris-Brennan/pen/pJORJY
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
#wrapperGreen {
margin: 0 auto;
width: 960px;
height: 700px;
background: green;
}
#mainContentLightgreen {
width: 520px;
height: 700px;
background: lightgreen;
}
#contentleftSkyblue {
width: 200px;
height: 600px;
background: skyblue;
float: left;
}
#contentrightSalmon {
width: 200px;
height: 600px;
background: salmon;
float: left;
}
#footer {
height: 100px;
background: black;
clear: both;
}
<div id="wrapperGreen">
<div id="mainContentLightgreen">
</div>
<div id="contentleftSkyblue">
</div>
<div id="contentrightSalmon">
</div>
<div id="footer">
</div>
</div>