Jump to content

<a href="#">


chadmichael

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...