Set the navigation bar to the top right

https://codepen.io/alicoding01/pen/WNRYzro

Hi guys!

I want to set the navigation bar to the top right but I couldn’t do it.

You are setting the header to the top right not the navigation bar.

It’s still the same, the navbar is over the logo now

In the same way that you changed the background color, you need to change the navbar from horizontal to vertical.

Hey @alisami585,

You were using fixed position on #nav-bar element, because of this only the links were fixed on top. Instead, I moved the fixed position to the header element and changed the floats to flexbox(which I would recommend you use in future as well). The links are on the right now. I guess this is what you were trying to do.

You can checkout the new code at https://codepen.io/Kwatranishkarsh/pen/KKabqLQ

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.