I’m currently using a template from TemplateMo for my website, and it’s giving me some trouble. The links on the menu bar, accessed through a drop-down menu, are not taking me to their respective pages. Here is my replit link: https://replit.com/join/ubwqyxrono-5pengoo
For easy reference, here is the code (Lines 71-73):
<li><a href="about.html" class="menu-item">About Us</a></li> <li><a href="help.html" class="menu-item">Help</a></li> <li><a href="tos.html" class="menu-item">Terms of Service</a></li>
Edit: Adding or removing a “/” before the file name in the href (i.e. “/about.html”) does nothing. Edit1: Adding or removing a “./” before the file name in the href (i.e. “./about.html”) also does nothing.
Also, I noticed that it only works if I right-click and choose one of the “Open Link…” options. However, it should obviously work on click.
Advertisement
Answer
<ul> <li><a href="about.html">About Us</a></li> <li><a href="help.html">Help</a></li> <li><a href="tos.html">Terms of Service</a></li> <!-- <li><a href="" class="menu-item">Blog</a></li> --> </ul>
after removing class attribute it is working fine.