CSS background color not showing up in nested <DIV>

background, css, html

Solution

Add `overflow:auto` to your wrapper div

#wrapper {
    background-color: yellow;
    overflow:auto;
}

jsFiddle example

Floating the inner divs essentially gives the wrapper div no height. By adding the overflow:auto it brings back the expected behavior.

Problem

I can not get my yellow background color to show up with the nested divs that show up in 3 separate columns. What am I doing wrong? ``` <div id="wrapper"> <div class="rightside"> Test </div> <div class="rightside"> Test </div> <div class="rightside"> Test </div> </div> ``` CSS below: ``` #wrapper { background-color: yellow; } div.rightside { width: 31%; margin: 0 1.33333em 0 0; display:inline; float:left; } ``` Here is my jsfiddle: http://jsfiddle.net/yPX5Q/2/ Thanks Cheers

Original source