<a href= "https://stackoverflow.com/#..." rel="nofollow noreferrer"> does not work
I am trying to create a set of links to specific sections of a page using notation <a href="#...">, but it does not work. Clicking on the link does not seem to do anything, and right-click -> open in a new tabchanges the URL, but does not move to another section of the page. I am using Firefox 28.0. My links are as follows:
<div>
<p>Contents</p>
<ul>
<li><a href="#map">Map</a></li>
<li><a href="#timing">Timing</a></li>
<li><a href="#timingdetails">Timing Details</a></li>
</ul>
</div>
And they should be related to:
<div id="map">[content]</div>
<div id="timing">[content]</div>
<div id="timingdetails">[content]</div>
Links to external web pages work great. Placing a function id="..."inside a tag <a>instead did not fix the problem. The URL of my webpage is in the form http://127.0.0.1/foo/bar/baz/. This is in the Python Django project.
Any idea why this is not working?
, , OP. -, Mozilla Firefox id HTML , <a>, name, Google Chrome . :
1. divs a name, id, . , :
<a href="#map">Go to Map</a> <!-- Link -->
----
<div id="map" name="map"></div> <!-- actual anchor -->
: http://jsbin.com/feqeh/3/edit
2. <a> name .
.
, , , IE, Chrome Firefox.
Around any text, create an anchor tag as follows:
<a class="anchor" id="X" name="X">text</a>
Set “X” to whatever you want.
You must enclose something in anchor tags, such as text or image. He will not work without them.
For reference, use the following command:
<a href="#X">text</a>
As for getting rid of CSS for links using our anchor tag, use something like this:
a.anchor {
color:#000;
text-decoration:none;
}
This seems to work well.