I have an issue with box-sizing:border-box
and Internet Explorer. The following example illustrates my layout:
<div class="content">
<div class="box">
<table>
<tr>
<td>Lorem ipsum</td>
<td>Lorem ipsum</td>
<td>Lorem ipsum</td>
</tr>
<tr>
<td>Lorem ipsum</td>
<td>Lorem ipsum</td>
<td>
<div class="Images">
<div class="liner">
<a href="https://www.example.com/image.jpg"><img src="https://www.example.com/image.jpg"></a>
</div>
<div class="liner">
<a href="https://www.example.com/image.jpg"><img src="https://www.example.com/image.jpg"></a>
</div>
<div class="liner">
<a href="https://www.example.com/image.jpg"><img src="https://www.example.com/image.jpg"></a>
</div>
<div class="liner">
<a href="https://www.example.com/image.jpg"><img src="https://www.example.com/image.jpg"></a>
</div>
<div class="liner">
<a href="https://www.example.com/image.jpg"><img src="https://www.example.com/image.jpg"></a>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
Please not that this is only a rough sketch of my page. The real one contains up to 30 images. The css for the divs are as follows:
#content .box .Images {
padding:0 0 20px 0;
box-sizing:border-box;
display:flex;
flex-wrap:wrap;
justify-content:space-around;
}
#content .box .Images .liner {
float:left;
padding:20px 0 0 0;
box-sizing:border-box;
}
This works fine in Chrome and Firefox, but not in IE 11. IE 11 displays all images in one row without a blank or a break. This causes the images to overflow the td. I'm using the same structure on other pages within divs were IE 11 doesn't create any problems.
So I guess there is an issue with IE 11 and the CSS box-sizing:border-box
property. I tried to set a fixed max width to the "Images" div, but this didn't help.
Has anyone an idea how to fix this issue? Or is IE 11 just messing up with box-sizing being used within table cells?