Inner links in navigation bar

i made a fixed navbar , then used inner links to scroll , when clicking on inner link the content is getting hidden behind navbar , i dont want to just give useles margin top , i want to build nice navigation bar like on official websites

Share your code as I am not able to clearly get what your query is

https://jsfiddle.net/Ldngos81/

in this when you will use nav bar to navigate down the main headings of content is getting hidden behind navbar

For this I would suggest you could use the position property in css available to align the things wrt each other
One more thing I would say that I went through the page you have designed and if I might suggest for better view you can giver seperator between the sections in your page and instead of giving the id of the section you can give the id of seperator by this when you navigate the page your page will be aligned properly in your viewport