Div CSS Novice Layout will encounter the layout of the background color can not be displayed, general layout background can not be displayed usually the following reasons:
1, by the use of float float caused by the float can not display the CSS background color
2, the height is not enough to produce background can not be displayed
Next, we'll explain why and how we can't display the background color or picture separately.
one, the CSS float float to produce the float cannot display the background style color
If you set an object background background color style, the object inside the box has a float floating property style, this time the object floated, causing the object can not be stretched, so the CSS background color can not be displayed, there are three solutions, one is to set clear clean floating , set the CSS height, and set the CSS overflow style.
Detailed tutorial accessible: CSS Clear floating
second, the height limit caused the background color can not be displayed intact
Reason Analysis:
If you have an object that does not compute the height (or accidentally set a very small height attribute style), because the content is not sure how much, when the content than you set the height limit, this time out of a part of the background may not be displayed.
Workaround:
Set the height high enough, or remove the height style.