div
에 display: table-cell
의 너비가 설정되어 있습니다. display: table-cell
는 내 최고의 옵션입니다. 나란히 여러 개가 필요합니다. div
높이가 같아야합니다.CSS 테이블 셀은 테이블 고정으로도 너비를 무시합니다.
연구를 마친 후 부모를 other threads에있는 display: table; table-layout: fixed; width: 100%
으로 올바르게 설정했지만 table-cell
은 여전히 부모를 채 웁니다.
.table-wrapper {
display: table;
table-layout: fixed;
width: 100%;
}
.table-cell {
display: table-cell;
width: 25%;
overflow: hidden !important;
border: 1px solid black;
}
<div class="table-wrapper">
<div class="table-cell">
Should be 25%, but it fills .table-wrapper
</div>
</div>
가능이 아닌가?