After much searching and attempting, I am still unable to achieve a simple task. My goal is to apply display inline-block to some divs while aligning them in a row, similar to the image below:
https://i.sstatic.net/iLhLS.png
The issue arises when number 4 and 5 are positioned after 1 with display inline-block:
https://i.sstatic.net/trftf.png
Any suggestions on how to resolve this?
.post-it {
background-color: #F00;
height: 140px;
padding: 1em;
width: 150px;
display: inline-block;
margin: 0 1.3em 1.5em 0;
box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.50);
}
.title {
font-size: 2em;
font-weight: bold;
line-height: 1em;
margin-bottom: .2em;
}
#today {
height: 300px;
}
<div>
<div class="post-it" id="today">
<header>
<div class="title">
Day 25
</div>
<hr>
</header>
</div>
<div class="post-it">
<header>
<div class="title">
Day 26
</div>
<hr>
</header>
</div>
<div class="post-it">
<header>
<div class="title">
Day 27
</div>
<hr>
</header>
</div>
<div class="post-it">
<header>
<div class="title">
Day 28
</div>
<hr>
</header>
</div>
<div class="post-it">
<header>
<div class="title">
Day 29
</div>
<hr>
</header>
</div>
</div>