Can´t center my navbar

Hi all!

Im struggling a bit with my navbar.

(Pictures below)

I want the navbar to be center inside the yellow frame, like the logo and the picture.
When I reduce the size of my browser, it looks nice, and if I reduce it further, it breaks.

Any tips?

// Thanks!

EDIT: Since Im a new user, Im not allowed to post more than one picture in a post :man_shrugging:

Picture deleted by user

Picture deleted by user

Picture deleted by user


You will more than likely want to use flexbox for this.

When you say centered I think of vertically AND horizontally centered. I think you just want horizontally though.

Tips when sharing HTML and CSS, and other code on this forum.

These methods allow others to work on your issue by copying the code and working on it themselves. People are busy/lazy and do not want to type out what you have. Likewise, when you receive a solution it should be provided in the same manner, which allows you to copy and paste on your end. Obviously, with photos this is not happening.

  • Place code in a code fence Extended Syntax | Markdown Guide. Scroll down to the Fenced Code Blocks and Syntax Highlighting sections of the previous link to see how this is done. You can place the backticks directly into this editor.

  • copy and paste your code into an online editor like or or They usually provide a method for copying a link to the code.

If you could provide your code in one of these ways then it would speed things up greatly and you would improve your feedback.


1 Like