I can center the element by setting justify-content:center, but why can’t the element be centered after adding position: fixed;? Doesn’t the flex layout take effect after using fixed?
.v-stairs-nav { display: flex; position: fixed; justify-content: center; }
position:fixed
The document is out of standard flow. You can solve this problem by addingwidth:100%