Make the Tweetmeme Retweet Button (iframe) Transparent
by admin on Feb.14, 2010, under Web Development, Wordpress
The Internet Explorer (IE) is acting strange when it comes to transparency, for instance transparent iframes like the retweet button from tweetmeme. I’m using the great Tweetmeme Plugin for Wordpress, but the problem with the transparency appears no matter which way of implementation you are using.
In IE 6, 7 and 8 it looks like this (ugly white background):

But is should look like this (transparent > black background):

Here is the workaround: Go to “Appearance > Editor > Header (header.php)” and paste this snippet before the </head> tag and click on “Update File” to save the changes:
<!--[if IE]>
<script type="text/javascript">
onload = function()
{
var theframes = document.getElementsByTagName('iframe');
for(var i = 0; i < theframes.length; i++)
{
theframes[i].setAttribute("allowTransparency","true");
}
}
</script>
<![endif]-->
Thanks to the _Aerospace_Eng_ who posted this snippet here.
This will add transparency to all iframes in the Internet Explorer (IE) and removes the white section between both parts. That’s it… Did you succeeded? Let me know!
No related posts.


February 27th, 2010 on 5:26 pm
Noticed that the real Tweetmeme-button is still not transparent? (I’m using Firefox and trying to make this annoying problem go away on my site too…)
Cheers from Sweden!
March 9th, 2010 on 6:08 pm
hi
doesnt seem to work on IE win7…
also, cant get it to work for FF win7… still ugly white bg…
why would all these tweet buttons not be transparent in teh first place? ugh…
March 9th, 2010 on 6:10 pm
oops – ok it works for FF win7, but not IE win7…
any advice?
thanks!
July 2nd, 2010 on 1:31 pm
Worked a treat! Cheers mate
August 6th, 2010 on 4:20 am
You are awesome, that white frame bugged me for days.