SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2012
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question about image rollovers

    When creating image rollovers, such as navigation bars, what technology is better and recommended for professional use? CSS sprites or JavaScript?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,299
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    You might as well use CSS sprites for that, as they are very reliable and quick to load. I can't see any advantage to using JS, but can see disadvantages. A user may have JS turned off, and some devices may not have great JS support.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2012
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply, Ralph.

    I googled about this subject. Other developers mentioned about using CSS sprites for rollovers also. There was a time when users implemented rollovers, they would use inline event handlers (messy), in cases people with limited knowledge in web development used this. I've seen other cases when developers created scripts for rollovers, or even more complex ones, which was why I was wondering what is better to use.

    I was considering creating a simple library for this feature.

    Thanks,

    I will use CSS sprites.


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
  •