How can I get my nav bar to the center?

Hello!

I can’t seem to get my nav bar to the center of the page :frowning: It goes to the left no matter what code I try to put there…

However, when I managed to get the nav bar to the center, the mobile version didn’t work well (the nav bar covered the header image).

What am I doing wrong? Any way to fix this?

There is my code:

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36.

Challenge: Build a Product Landing Page

Link to the challenge:

Hi. Try to use display: flex. See what will happan.
https://codepen.io/jonnamaatta/pen/LYGPXBa

Delete position = fixed from the #nav-bar and add
display: flex;
justify-content: center;

1 Like

Thank you so much! It worked