2014-02-09 38 views
0

我有1個.infobox div與4個嵌套.detailbox divs最後一個(.detailbox)div浮動在新行中,在第一個元素下。這是爲什麼?它應該適合在那裏:-)我已經嘗試過保證金和填充。沒有成功。謝謝4 25%寬度元素不適合100%元素

.infobox { 
-webkit-border-radius: 6px; 
-moz-border-radius: 6px; 
border-radius: 6px; 
width: 100%; 
-webkit-box-sizing: 'border-box'; 
-moz-box-sizing: 'border-box'; 
box-sizing: 'border-box'; 
height: 300px; 
overflow: hidden; 
border: 1px solid #dedede; 
background-color: #f7f7f7; 
float: left; 
margin-bottom: 40px; 
margin:0px 
} 

.infobox .detailbox { 
height: 40px; 
overflow: hidden; 
width: 25%; 
box-sizing: 'border-box'; 
-moz-box-sizing: 'border-box'; 
-webkit-box-sizing: 'border-box'; 
float: left; 
padding: 10px 0; 
border-bottom: 1px solid #dedede; 
border-right: 1px solid #dedede; 
text-align: center; 
margin:0px 
} 

.infobox .detailbox:last-child { 
border-right: none !important 
} 

回答