This is due to how Flexbox works.
Since the container .horizontalis the flexible child itself, it automatically adjusts to the size of other children. Only space resolution for overflowing content that are children of itself .horizontal.
, justify-content: space-between .
, :
.horizontal {
flex-direction: row;
background-color: red;
width: 100%;
}