I've got a page with a base tag (has to be there) and named anchors. I want to be able to just use <a href="#anchorname">This is the name</a> but when I do that, it takes me to "basehref#anchorname" when I want it to go to "currenturl#anchorname". Is this just not possible with a base tag? Do I have to know what page I'm on to do this?
Also... if I put in a url like this:
Code: Select all
<a href="/article/why-people-smell-bad#section">Section</a>
If I am already on /article/why-people-smell-bad, will it reload the page? I can't really tell.
EDIT: Another question
How come this works? I mean, how come this anchor leads to this section of the page?
Code: Select all
<a href="#section">Anchor link</a>
<div id="section"></div>
I thought a named anchor was required for that:
Code: Select all
<a href="#section">Anchor link</a>
<a name="section"></a>
d11wtq | Fixed your highlighting... "html" needs to be lowercase