What is the best way to position the .square
elements inside the #about_container
?
The squares should be aligned 10px
from the top of #about_container
, regardless of whether there is text present.
#about_container {
position: absolute;
width: 100%;
height: 200px;
background-color: rgba(146, 106, 106, 1);
margin-bottom: 50px;
overflow-x: scroll;
white-space: nowrap;
overflow-y: scroll;
padding-top: 10px;
padding-bottom: 10px;
}
.square {
display: inline-block;
height: 180px;
width: 180px;
background-color: white;
margin-left: 5px;
margin-right: 5px;
border-radius: 5px;
font-size: 10px;
text-align: center;
word-wrap: break-word;
}
<div id="about_container">
<div class="filler_space"></div>
<div class="square">
<p>Some random text here</p>
</div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="square"></div>
<div class="filler_space"></div>
</div>