Background colour of <div> containing <ul>
This question already has an answer here:
This should work: <div style="background-color: #302683; overflow: hidden;">
See the example: http://jsfiddle.net/b8q836zs/1/
Overflow: hidden|auto will make an element establish a 'new block formatting context' — an isolated container, which will keep it from flowing into the space occupied by preceiding floats — see: CSS 2.1 - floats.
链接地址: http://www.djcxy.com/p/88428.html下一篇: 包含<ul>的<div>的背景颜色