2014-02-09 5 views
0

1 개의 .infobox div와 4 개의 중첩 된 .detailbox div가 있습니다. 마지막 (.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 
} 

답변

관련 문제