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):

reweet button no transparency

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

 tweetmeme button with transparency

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!

  • Share/Bookmark

No related posts.

:, , , , , , ,

5 Comments for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...