Reputation:
I have two webpages, one is index.html and the other is shop.html. I am trying to link from shop.html to a section with the Id of #contact in index.html. They both share the same navbar. They are both in the same folder called "Mobile".
This is the code that I am using. This is the code for the contact link that is on the navbar shared by both pages, but I am trying to accesss it from the shop.html.
<li><a href="index.html#contact">CONTACT</a></li>
I have managed to get it to work once, but that was only by right clicking and opening the tab in a new window.
Upvotes: 0
Views: 94
Reputation:
Thanks for the help, turns out it was a jquery smooth scrool animation messing with it.
Upvotes: 0
Reputation: 1771
Try this:
<a href="index.html#contact" target="_blank"><li>CONTACT</li></a>
By default, your browser should have target="_blank"
as shown in the Firefox documentation. It may just be an issue with having your list tags wrapped around the anchor tag. If you post the CSS and HTML you are linking to in index.html, I can make sure this works.
Upvotes: 0
Reputation: 11
I'm not sure if this works, but you can try:
<a href="index.html#contact" target="_blank">Contact</a>
This will force it upon opening it in a new tab. However, it should be working only doing
<a href="index.html#contact">Contact</a>
Upvotes: 1