0

I am building a simple menu. Among layouts I've considered is a plain-jane dropdown that looks like this for numerous items:

    <li>
      <a href="#!">Fare</a>
      <ul class="nav-dropdown">
        <li><a href="tomatoes.php">Tomatoes</a></li>
        <li><a href="cheese.php">Cheese</a></li>
        <li><a href="bacon.php">Bacon</a></li>
      </ul>
    </li>

This seems very functional, but there are often the #! characters appended to the URLs when I navigate among pages. Of course if I eliminate those characters, the dropdown behavior stops altogether.

Are there other means for coding anchors to eliminate these from URLs?

user604488
  • 67
  • 2
  • 10
  • You can use `javaScript` -- And use selectors to `.scroll()` to the desired element. – Zak Apr 14 '20 at 17:28
  • Thank you, and I'm sure you are right. If only I knew where to begin. – user604488 Apr 14 '20 at 17:45
  • Check out [Caveman's Answer](https://stackoverflow.com/questions/5007530/how-do-i-scroll-to-an-element-using-javascript) – Zak Apr 14 '20 at 17:50

0 Answers0