The following sample exemplifies the issue I'm having.
So, if I have a container with a width of 200 pixels,
In the container, I add a 200px wide row (will add lots of rows)
I'd like to add 200px wide divs to the row (different each row)
Everything works perfectly until I add a 1px solid edge to the.cont div.
Why isn't the.cont boundary taken into account for box-sizing?
*,
*:before,
*:after {
-webkit-box-sizing: border-box !important;
-moz-box-sizing: border-box !important;
-ms-box-sizing: border-box !important;
box-sizing: border-box !important;
}
.cont {
position: absolute;
background-color: white;
font-size: 12px;
overflow: hidden;
border: solid;
/* Remove this and it works */
border-color: purple;
border-width: 1px;
height: 200px;
width: 200px;
margin: 0;
padding: 0;
}
.h_row {
display: block;
width: 100%;
height: 22px;
line-height: 22px;
background-color: red;
overflow: hidden;
border-bottom: solid;
border-bottom-color: orange;
border-width: 1px;
margin: 0;
padding: 0;
}
.cell {
display: block;
float: left;
font-size: 11px;
height: 20px;
line-height: 20px;
text-align: left;
text-indent: 2px;
overflow: hidden;
margin: 0;
padding: 0;
}
.h_row>.cell {
font-size: 12px;
text-align: center;
height: 22px;
line-height: 22px;
border-right: solid;
border-right-color: pink;
border-right-width: 1px;
background-color: green;
}
.h_row>.cell:last-child {
border-right: none;
}
.w50 {
width: 50px;
}
.w100 {
width: 100px;
}
<div class="cont">
<div class="h_row">
<div class="cell w100">100</div>
<div class="cell w50">50</div>
<div class="cell w50">50</div>
</div>
</div>