SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Apr 2004
    Location
    Somewhere in the Middle East
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Best way of doing multiple rollovers

    Hi everyone!

    I have an image link that when rolled over makes the 2 images next to it change into animated GIFs. See horizontal menu here

    The code I currently am using to do these rollovers works most of the time but sometimes it is temperamental. What I mean is that exactly the same piece of code, on the same page, using the same browser works sometimes but other times it doesn't. For example, when I rollover the image link sometimes one of the images next to it doesn't change state or when I rolloff the image link, one of the images next to it doesn't return to its original state.

    I have found countless different ways of doing rollovers, including using Javascript and CSS, but I want to know which one is best as I am currently cleaning up the website's code and thought I'd get it resolved.

    Thanks for your time!

    Leao

  2. #2
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I am pretty sure you can do this, I cannot test right now. I would make that nav menu a unordered list. Position the wheel in the background using CSS. Then put the moving gif as the bAckground on :hover, again via CSS
    Ryan B | My Blog | Twitter

  3. #3
    SitePoint Zealot
    Join Date
    Apr 2004
    Location
    Somewhere in the Middle East
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is CSS the best way of doing things generally?

  4. #4
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    IMO yes. But a JS person can say JS is better.
    Ryan B | My Blog | Twitter


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •