Pseudo elements breaking justify-content: space-between in flexbox layout
问题 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 ? codepen.io .container { width: 100%; display: flex; justify-content: space-between; padding-top: 50px; background: gray; } .container div { background: red; height: 245px; width: 300px; } .container