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/
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.
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=” ”>.
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!
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With