I have a problem with a simple anchor problem…
Portfolio_view.php
<div id="site-name">
<a href="#portfolio">Go to portfolio</a>
<h1 id="portfolio">Portfolio</h1>
</div>
When i am on the portfolio.php i use this code:
<a class="album_object" href="portfolio_view.php?album=objecten#portfolio"><a/>
This doesnt work for some reason.The browser just stay at the top of the page.
But this on the portfolio_view.php does work correctly
<a href="#portfolio">Go to portfolio</a>
When i refresh the
portfolio_view.php?album=objecten#portfolio
It does work properly
So i cant figer out whats the problem.
I am using HTML5 by the way.
If you c/p the markup, then its cause your backslash is off.
You have a typo:
<a/>instead of the correct</a>Edit:
Also, I had the problem where if you link to an id in a page, when you visit that link the browser will drop to either the top of the content with that id, or until it reaches the point where it is the height of the document minus the height of the window.
This means if your page doesn’t need scrolling or there is not a full window’s worth of content below the position of the id, when you link to that id, it will appear as though nothing happened. This is because the browser can’t scroll down to the top of the content with that id because the document is not tall enough.
Hope that made sense.