Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Hover state without anchor???

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25462
    Mr Dobalino
    Member

    Hi,

    Is there a CSS only, multi-brower (including IE6) way I can set up an image to change when I hover over it?

    I can achieve it using sprites and the hover state on an anchor link, but I don’t want it to be a link. Either that or I don’t want the link to be active (using href="#" seems to jump to the top of the page and make the image disappear???). Problem with that of course is that the markup won’t be valid with a link doesn’t actually link to anything (I believe). Is there anything I can do within the anchor tag that will make absolutely nothing happen when it is clicked on?

    I want to avoid using JS but if there is no other way, so be it.

    Thanks for any help

    #60792
    mrgr8avill
    Member

    I have done it with JS using onmouseover/onmouseout and the setTimeout() method. I know you are looking for a "pure" css way of doing it, but if you can’t get anything and need help on the js end, let me know and I will get soem code together for you….

    #60794
    TheDoc
    Member

    As far as I know, you’ll need to use some JS.

    #60928
    EamonnMac
    Member

    The W3C (http://www.w3schools.com/css/pr_pseudo_hover.asp) only use the hover pseudo class in conjunction with an anchor link… For what it’s worth, I’ve never seen it used otherwise.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.