Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 09, 2016, 03:43:00 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Javascript remote rollover - works in IE7 but not IE6  (Read 3169 times)

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
Javascript remote rollover - works in IE7 but not IE6
« on: March 07, 2008, 06:40:21 PM »
Working on a new site (http://aboutfaceuk.com/test/ ).

The 'Get In Touch' button (bottom right) is actually a transparent anchor, over a <div> with a background image, containing both the normal and hilighted versions of the contact info.

A very simple piece of javascript changes the background-position to show the hilighted version.

Code: Javascript [Select]
  1. function SecondWaveClass() {
  2.   document.getElementById('SecondWave').style.backgroundPosition="0 -145px";
  3. }

The code works in IE7, Opera, FF but not IE6 and I can't see why?

Any fellow designers / coders have any clues?

Thanks.

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
Re: Javascript remote rollover - works in IE7 but not IE6
« Reply #1 on: March 09, 2008, 11:42:10 AM »
Solved: was nothing to do with the rollover, but rather a limitation of the transparent png hack for IE6 (it can't do position offsets).