Not working display:block;

Hi I have problem like in the title of this topic. Any ideas? Thank you

Here your issue is not in your title it is in the navbar.What is happening is that you are trying to align two different elements and make them one.That is bad because it is very unresponsive to any changes in screen size and will make you have to put unnecessary margins on the sides. There is a much better way to set up the navbar- By using buttons and not lists. Here is a quick tutorial on how to do that.

https://www.w3schools.com/howto/howto_js_topnav.asp

I do it a bit differently and use buttons and customise them rather than the links. It is just easier and more adaptive to different styles.Here is mine. It is not a whole lot responsive but it is a good outline to start with.

And just in case you wanted to see it in action. The portfolio is undergoing a makeover so bear with me.

https://codepen.io/ismailhozain/pen/VrxroE?editors=1100