<html>
<head>
<style>
<!-- * {
box-sizing: border-box;
} -->
div {
width: 50%;
margin: auto;
}
.cardBox {
display: inline-block;
border: solid 1px black;
height: 102px;
width: 68px;
margin: 100px 0px 0px 0px;
padding: 0px;
}
span img {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<div>
<span class="cardBox" id="box1"><img src="h4.png"></span>
<span class="cardBox" id="box2"><img src="h4.png"></span>
<span class="cardBox" id="box3"><img src="h4.png"></span>
<span class="cardBox" id="box4"></span>
<span class="cardBox" id="box5"></span>
</div>
</body>
</html>
Same result in Chrome and FF. I've tried to set the image height/width to match the span cardBox's, I've also tried less than 100%. I also tried auto
. It all results in various movement of the container spans. The image itself is 99x66px, and below is a copy of it:
The other question I have is why is their a gap between the spans?