Friday 13 April 2012

How to remove Google Plus 1 button linefeed in Internet Explorer


I was trying to Google +1 button to one of my sites. It was working fine in Firefox & Chrome browsers. But It did not work properly in Internet Explorer. It was distorting all other social book mark buttons in that line and adding linefeed.
Internet Explorer 8 & 9 adds a new line before and after the plus one button. It does not work at all in older versions like IE7 etc. This is caused because Internet Explorer might be running in quirk mode to allow backward compatibility.
You need to make Internet Explorer not to render web page in quirk mode using DTD. Add below line just before html tag in your web page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Adding above line makes IE 9 not to run in quirk mode. If you use ShareThis or AddThis tools to generate bookmarklet buttons, you need to add above line then also.
I tried adding <div style="display: inline;"> tags around the buttons, it did not work either. Hope this helps you guys.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
Powered by Blogger.