A title

...">

Safari binds to links that don't work

My html anchor is as follows.

<a name="template-8"/>
<h4 class="template" id="template-8">A title</h4>

As far as I know, the browser should skip the element with the corresponding name or id attribute.

When I type in the URL http://my.site.com/templates#template-8 , the safari jumps down as expected.

However, when snapping, as shown below, snapping does nothing. Chrome, Opera, IE7 and Firefox work.

<a href="http://my.site.com/templates#template-8">A link</a>

Safari - version 5.0, can this be a safari bug?

+5
source share
5 answers

The problem was that I had a redirect header on the page I was linking to.

Opera, IE, Chrome, Firefox . .

-, .

+15

http://domain.com/page#myanchor 

http://domain.com/page/#myanchor
+10

- , , 2010 , , , , - .:)

htaccess url mydomaincom/index.php mydomaincom/ , nav Safari , href-, index.php # Safari v5 .

, , URL-, mydomaincom/#. , ( , , :))

+2

, , ( ), , , :

  • <a>. , , : <a name="template-8"></a>.
  • name id " ", name id. 10 , .
+1

Safari. :

 <a href="#" class="btn">A tag</a>

css:

.btn{
  display:block;
  width:100%;
  height:100%;
}

- , Safari , , . :

<ul>
    <li><a href="#" class="btn">A tag</a></li>
    <li><a href="#" class="btn">A tag</a></li>
</ul>

Safari 6 +

-1

All Articles