chadmichael Posted May 22, 2008 Share Posted May 22, 2008 What does it mean when the href of an anchor is the pound sign by itself? Is this valid? Link to comment Share on other sites More sharing options...
jeffman Posted May 22, 2008 Share Posted May 22, 2008 It's one of several valid ways of giving the link no destination. The idea was to get the script-like advantages of the :hover property for objects that were more button-like than link-like. In IE7 and all other modern browsers, any element has access to :hover, so as IE7 and then 8 get more popular, we should see the # option being used less and less often. Link to comment Share on other sites More sharing options...
Ingolme Posted May 22, 2008 Share Posted May 22, 2008 I use <a href="java script:void(0)"> instead. For two reasons:1. It doesn't scroll to the top of the page when you click on it2. Even if javascript is disabled it won't do anything strange with the page Link to comment Share on other sites More sharing options...
Synook Posted May 23, 2008 Share Posted May 23, 2008 Well a really old browser might try to go to http://www.site.com/java script:void(0) :)You can use the pound sign as a shortcut for a link that brings you back to the top of the page. Instead of <a id="top"></a><!-- ... --><a href="#top">Top</a> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.