ReadingIEPNGFix: Unclickable children of element Permalink

IEPNGFix script will show an error when the behavior is applied to a div container with position:relative; inserted.

Alert error is: “Unclickable children of element

Solution

You need to add the behavior:url(iepngfix.htc); to a div without position:relative; inserted.

  • Add behavior:url(iepngfix.htc); to the div container with backgroung PNG image
  • If the div container needs position:relative; remove it
  • Add a new div inside the div container
  • Add position:relative; to it

The code

t = tFix.length;
if (t && (/relative|absolute/i).test(elm.currentStyle.position)) {
alert('IEPNGFix: Unclickable children of element:' +
'\n\n<' + elm.nodeName + (elm.id && ' id=' + elm.id) + '>');
}

* Update: In various situations, it was pointed out that remove the alert error might just work without a new div for relative positioning. In this case, you need to remove:

alert('IEPNGFix: Unclickable children of element:' +
'\n\n<' + elm.nodeName + (elm.id && ' id=' + elm.id) + '>');

Please proceed to Solution posted above, as I don’t recommend removing the alert error only.

Also, please take in mind that this post is related to an older version of IEPNGFix, and not the one posted when this snippet was posted: IEPNGFix 2.0 Alpha 4.

One response Comments RSS

Do you want to comment?

remove the alert message

Looking for more? See all posts on the blog.