Schuhplattler
Schuhplattler

Reputation: 13

Linking to specific sections on a different page

My objective is to link to specific sections on merchandise.html from other html pages on the site, all of which have the relevant sending links set by a .dwt file, so the sending links are uniform on all sending pages. In Int Ex 11 this works fine, but not in Fire 75.0 or Chrome. In those browsers, the links take me to the source code of merchandise.html. Example: Sending page (in top navigation bar):

<li class="dropdown">
<a href="javascript:void(0)" class="dropbtn">Merchandise</a>
<div class="dropdown-content">
<a href="merchandise.html #apparel">Apparel and Accessories</a>
<a href="merchandise.html #dvd">DVD's</a>
<a href="merchandise.html #cd">CD's</a>
</div>
</li>

These are meant to link to the following markers in merchandise.html:

<h2 id=dvd>DVDs</h2>
<h2 id=cd>CDs</h2>
<h2 id=apparel>Apparel and Accessories</h2>

I repeat, this works fine in Int Ex 11 browser.

Upvotes: 1

Views: 73

Answers (1)

Nemo Zhang
Nemo Zhang

Reputation: 146

You are doing mostly correct.

Removing the space between ".html" and "#" might do the job. A standard URI should not have that space. Such as merchandise.html#apparel.

Also, standard html tag attributes should have quotes around them. Such as <h2 id="apparel">...</h2>.

Upvotes: 1

Related Questions