Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML UL LI a href links not working

I am working on a website and for the menu I have the following code:

<header>
  <div class="sticky-nav">
    <a id="mobile-nav" class="menu-nav" href="#menu-nav"></a>
    <nav id="menu">
      <ul id="menu-nav">
        <li><a href="http://aevidum.com">Home</a>
        </li>
        <li><a href="">Clubs</a>
        </li>
        <li><a href="">Campaigns</a>
        </li>
        <li><a href="">Movement</a>
        </li>
        <li><a href="">Events</a>
        </li>
        <li><a href="">The Talk</a>
        </li>
        <li><a href="">Resources</a>
        </li>
        <li><a href="">Donate</a>
        </li>
        <li><a href="">#Aevidum</a>
        </li>
        <li><a href="">Contact</a>
        </li>
      </ul>
    </nav>
  </div>
</header>

But when I click on the home link it doesn't go anywhere or do anything. Anyone know what the issue could be?

Here is a link to the directory I'm working on it in: http://aevidum.com/brushed/

like image 792
Benjamin Porter Avatar asked Nov 16 '14 02:11

Benjamin Porter


People also ask

Why is UL not working?

when you say "ul does not work" and "ul li works" it is because only the latter is targeting the element you want to style, the list item itself.

How do you activate a link in HTML?

To make a hyperlink in an HTML page, use the <a> and </a> tags, which are the tags used to define the links. The <a> tag indicates where the hyperlink starts and the </a> tag indicates where it ends. Whatever text gets added inside these tags, will work as a hyperlink. Add the URL for the link in the <a href=” ”>.

What does href =# do?

Definition and Usage The href attribute specifies the URL of the page the link goes to. If the href attribute is not present, the <a> tag will not be a hyperlink. Tip: You can use href="#top" or href="#" to link to the top of the current page!


Video Answer


1 Answers

I think some java-script or jquery function is overriding your current functionality, because the code which you posted works fine without any includes.

<header>
  <div class="sticky-nav">
    <a id="mobile-nav" class="menu-nav" href="#menu-nav"></a>
    <nav id="menu">
      <ul id="menu-nav">
        <li><a href="http://aevidum.com">Home</a>
        </li>
        <li><a href="">Clubs</a>
        </li>
        <li><a href="">Campaigns</a>
        </li>
        <li><a href="">Movement</a>
        </li>
        <li><a href="">Events</a>
        </li>
        <li><a href="">The Talk</a>
        </li>
        <li><a href="">Resources</a>
        </li>
        <li><a href="">Donate</a>
        </li>
        <li><a href="">#Aevidum</a>
        </li>
        <li><a href="">Contact</a>
        </li>
      </ul>
    </nav>
  </div>
</header>
like image 137
Sunil Goli Avatar answered Sep 18 '22 13:09

Sunil Goli