The problem is a conflict with the Bootstrap stylesheet, which places pseudo-elements in your flex container. This causes space-between
to calculate multiple flex items as opposed to just two.
Here's your flex container:
The logo and nav menu are aligned with justify-content: space-between
, but are not positioned at opposite edges. The alignment looks more like space-around
.
Here's Bootstrap's ::before
and ::after
pseudo-elements (or pseudo-flex items):
As noted in Firefox documentation:
In-flow ::after
and ::before
pseudo-elements are flex items.
Let's put some content in the pseudos:
Like shining a black light in a motel room, you see a lot of stuff you wish wasn't there.
Remove (or override) the pseudo-elements and your problem is gone:
More details about flex containers and pseudo-elements:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…