So, I just working with HTML/CSS a bit and I hit a bit of a spacing dilemma. Here is my code.
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Tic Tac Toe Demo</title>
<link rel='stylesheet' type='text/css' href='styles/styles.css'>
</head>
<body>
<div id='container'>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
CSS:
body{
background-color: grey;
height: 1080px;
width: 50%;
margin: 0 auto;
}
#container{
height: 100%;
width: 100%;
background-color: white;
}
div div{
display: inline-block;
background-color: grey;
height: 25%;
width: 25%;
margin: 5px;
}
I have tested in Chrome and Firefox. I want the blocks in the container to fill the space however you can see that there is a white space. And I cannot figure out why this is. I have been able to manipulate it but I would rather learn the best practices way of correcting this instead of my ADHOC approach.