I have a single Div that is set to 80% width and I want to place Boxes inside it. However, I need the Boxes to be centered regardless of the outer div's width.
.kachel_wrapper {
margin: auto auto;
width:80%;
background:orange;
min-height:450px;
margin-top:70px;
}
.kachel {
height:180px;
width:180px;
margin-top:20px;
float:left;
margin: auto auto;
margin-top:15px;
margin-left:10px;
background:#6e7176;
}
<div class="kachel_wrapper">
<div class="kachel"></div>
<div class="kachel"></div>
<div class="kachel"></div>
</div>
Can anyone help me with this issue? How can I ensure that the Boxes are always centered within the specified width?