I am having a navbar having links to homepage and other stuffs and it is same for every page so it is only kept in home directory and linked with other htmls. The problem I am having is with the anchor tags as different files are kept in different directories, so the relative link to homepage and other stuff will also differ. For example let my home directory name be 'abc' and homepage and navbar is located in this directory as 'abc/homepage.html' and 'abc/navbar.html'. Anchor tags works well on homepage but in different directory it doesn't. As if I access it from 'abc/def/otherPage.html' it isn't working in other page as now homepage link is '../homepage.html' rather than just 'homepage.html'. Someone plz suggest a solution out of this problem.
As i understand you need to use absolute path for links, for example "/abc/homepage.html", not "abc/homepage.html". In this case no matter from where you click to this link you will come to /abc/homepage.html