Having an odd problem at the site. Link tag having href="#anything"
doesn't move you to the top of the page or to the specified anchor, it moves you to the home page. That's it - when I hover over the link I see at my FF's status bar example.com/#
instead of example.com/testpage.php#
.
Site is full of crap code and it's impossible to verify all of the settings and especially header configuration or etc.
Any hints on where this might be?
P.S. Link's href
is not altered with JS, Firebug claims it to be href="#"
when I click it.
The href attribute specifies the URL of the page the link goes to. If the href attribute is not present, the <a> tag will not be a hyperlink.
The href attribute link (short for “Hypertext REFerence”) indicates the relationship between pages to search engines. href is an attribute of the anchor tag and contains two components: The URL (the actual link) and. The clickable text or object that users will see on the page (known as the “anchor text”)
The <a> tag defines a hyperlink, which is used to link from one page to another. The most important attribute of the <a> element is the href attribute, which indicates the link's destination. By default, links will appear as follows in all browsers: An unvisited link is underlined and blue.
My initial thought is that you may have a base tag in play somewhere. Check your code for something like the following, and remove it if necessary:
<base href="http://www.mydomain.com/testpage.php" />
Obviously, caution is necessary as there may be some markup that is dependent upon any pre-existing base tags. Also make sure that your href value is not preceded with a foward slash like this:
<a href="/#anything">Click Me</a>
As this will go to #anything on the default startpage of the root directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With