Try adding a margin that fills the page horizontally, and then centering the text within that. Use CSS text-align instead. text-align:center not working in Mozilla. Text-align will center an object within the box you create for it.

Charles Crume. Instead of text-align: center; you should use margin: auto .box1 { background-color: #FC6A03; font-family: 'Courier New', Courier, monospace; display: flex; align-items: center; } .box1 span { display: flex; margin: auto; margin-top: 0;