I am trying to develop a navigation bar for a website with a dropdown menu. I am running it locally and have the "links" stored in a folder called categories This line of HTML is giving me issues
<li><a href="./categories/about.shtml">About</a></li>
The first time when I go to the about page it works fine, but I run into a bug in that if I click the "About" dropdown again there is an error because it is searching for "categories/categories/about.shtml.
Is there any way for me to use href so that it will essentially search a file tree from a given "root" to prevent this from happening.
You're using a relative path, when on the home page you do click the link the path of the link is not the same.
At home page is:
<li><a href="./categories/about.shtml">About</a></li>
But when you click it, and you navigate to it, it should become to:
<li><a href="./about.shtml">About</a></li>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments