https://jsfiddle.net/yx296/2fmq9sdm/
I'm trying to create a C shape with 7 blocks, so I set display inline-block for the top 3 and the bottom 3, where is the margin coming from between the middle block and the top block? And whats the best way to get rid of it.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>vanillaJavascript</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<div class="topRow box"></div>
<div class="topRow box"></div>
<div class="topRow box"></div>
<div class="box"></div>
<div class="bottomRow box"></div>
<div class="bottomRow box"></div>
<div class="bottomRow box"></div>
</div>
</body>
</html>
CSS
.box {
width: 50px;
height: 50px;
border: 1px solid black;
}
.topRow {
display: inline-block;
}
.bottomRow {
display: inline-block;
}