DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

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

Ampa

  • I am cute ;)
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
Javascript remote rollover - works in IE7 but not IE6
« on: March 08, 2008, 12:40 AM »
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)
function SecondWaveClass() {
  document.getElementById('SecondWave').style.backgroundPosition="0 -145px";
}

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

  • I am cute ;)
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
Re: Javascript remote rollover - works in IE7 but not IE6
« Reply #1 on: March 09, 2008, 04:42 PM »
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).

Original address: https://www.donationcoder.com/forum/index.php?topic=12576.0