I need to make the div align horizontally.
.d1 {
margin-left: 1rem;
margin-right: 1rem;
font-size: 0;
text-align: justify;
}
.d1::after {
content: '';
font-size: 0;
line-height: 0;
height: 0;
width: 100%;
display: inline-block;
}
.dd {
display: inline-block;
position: relative;
font-size: initial;
}
<div class="d1">
<div class="dd">aa</div>
<div class="dd">bb</div>
</div>
however, the justification of the div is not working and it remains left-aligned. Why is this happening?