I have three divs inside a parent div that are being spaced out using:
display: flex;
justify-content: space-between;
However, the parent div has an :after
on it which is making the three divs not go out to the edge of parent div. Is there a way to have flexbox ignore the :before
and :after
?
.container {
width: 100%;
display: flex;
justify-content: space-between;
padding-top: 50px;
background: gray;
}
.container div {
background: red;
height: 245px;
width: 300px;
}
.container:before {
content: '';
display: table;
}
.container:after {
clear: both;
content: '';
display: table;
}
<div class="container">
<div></div>
<div></div>
<div></div>
</div>