How can I avoid these spaces between blocks, which are supposed follow each other horizontally?
#wrapper {
margin: 0px auto;
width: 1054px;
}
#posts {
float: left;
width: 804px;
}
#sidebar {
position: fixed;
width: 250px;
height: 100%;
margin-top: 0px;
margin-left: 804px;
}
.post {
margin-right: 0px;
border: 1px solid black;
margin-bottom: 0px;
padding: 10px;
float: left;
width: 400px;
}
<body>
<div id='wrapper'>
<div id='posts'>
<div class='post'>
<!-- Posts are supposed to be here following each other horizontally, going to the next line without huge spaces. -->
</div>
</div>
<div id='sidebar'></div>
</div>
</body>
Here is a picture for you showing these spaces: