Trevor Hutto
Trevor Hutto

Reputation: 2142

PHP Redirect to an anchor tag

I want to navigate from another page to the bottom of the home page.

Where section that I want to navigate to on the home page is defined by:

<div name="about" id="about" class="about-us">

Everywhere I read it says all you have to do to link to this page and this location is say:

<a href="/public_html/index.php#about">Link to bottom of home page.</a>

However, it does not work. There has got to be something simple that I am over looking.

EDIT:

Whenever I click the link, the browser does nothing, like it is not a link.

Take this example:

I am on the homepage, I click a link to #about, it scrolls down to #about, no problem.

I am on a page that is not the home page. I click on a link to #about, the browser does nothing, does not even take me back to the home page.

Upvotes: 0

Views: 1832

Answers (1)

mister martin
mister martin

Reputation: 6252

The code in your example will work just fine, so something else is probably preventing the jump. For example, if you have a form on the page that has auto focus.

Upvotes: 2

Related Questions