Need some help with centering the NAV bar

I would like to put the words zaza on top of the about,catagories link
and put all the text in the middle, i’ve been playing around with flexbox but couldnt find the solution.
edit: also would like to know why my navbar has some space between the the sides and top.

https://codepen.io/joshkwannacode/pen/QWyBOWJ

The reason why you’re getting that problem is that the header element is display:flex and by default flex-direction:row, so you should change that.

It’s sometimes confusing that flexbox doesn’t care about the children display property (it seems you expect blocks to be in different lines, right?), but that’s the case. When flexbox is applied, children behave different.

As for the second question, you should ask yourself this:

What makes an element have space around?

Hints
If it were the padding, I’d reset that using padding:0;. It’s not the padding though. Your task to find the answer here!

1 Like

thanks man , still having problems with the spacing though hahah could u give me another hint was trying margins and changing the widths but stilll dont get it.

Sorry but I’m rather busy now, you can remind me through a private message if no one helps you, two/three hours from now (the time of this reply).