开发者

Container Color Background Not Showing

I just made a new layout and in my container it is supposed to be filled in with a light blue color. Except it doesn't seem to be working. In the screen shot it also shows how the container starts but then stops underneath the navigation links.

Also the container background seems to be working o开发者_如何学Pythonn my .index.php page but not on any of my others because I use PHP includes.

LINK TO MY LAYOUT SCREENSHOT : http://i56.tinypic.com/2wgc4fs.jpg

And my CSS is this :

#container {
  margin: 0 auto 0 auto;
  width: 900px;
  padding: 10px;
  background: #a1aeae;
}


The floating content doesn't influence the height of the container (and falls out the bottom), and the background only appears where the container does.

See containing floats for why and methods for containing floats for some better approaches than extra div elements. I'm fond of the overflow approach.


I thought you have to pu it like this

#container {
margin: 0 auto 0 auto;  
width: 900px;
padding: 10px;
background-color: #a1aeae; 
} 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜