How To Fix Internet Explorer Javascript, PNG Transparency, and Other CSS Problems In One Simple Step

Filed August 31st, 2010 under Web Technologies

We’ve all been there – project is nearing completion, your site looks great in webkit and firefox, and you want to get paid, but your curmudgeonly client cares what his site looks like in IE6 because his clients are all civil servants, and the government only updates their computers once a decade. Or maybe you just run a publishing site like mine, at SalaciousSound.com, and would prefer not to ignore the largest browser segment in the market.

Either way, Internet Explorer can be a pain in the butt, but only if you let it!

I just came across a solution in the google code repository called ie7-js, which

is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. It fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6.

Pretty sweet. I just tried it out, and it worked like a charm.

Option 1 – If all your png images with transparency end in “-trans.png”

Only one quick step is required, since the people hosting the code are cool with direct linking to the js file (which helps load time a lot, especially in the case of jquery). Copy and paste this code, and you’re good to go:

<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script>
<![endif]-->

Option 2 – No consistency in filenaming of png images with transparencyCopy and paste this code, and you’re good to go:

<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js">
IE7_PNG_SUFFIX=".png";
</script>
<![endif]-->
Cailen McQuattie
Corporate and Securities Capital Pool Companies Real Estate Joint Venture Equity Financing Debt Financing Acquisitions/Dispositions Background John D. Wright is a founding partner with the firm. John graduated from the University of Toronto where he received his Bachelor of Arts in 1972 and his LL.B. in 1975 and was called to the Bar in 1977.John's preferred areas of practice are corporate and commercial law relating to owner operated and junior public companies. He has particular expertise in the areas of capital pool companies, real estate joint ventures, corporate reorganizations, mergers and acquisitions, securities law and debt and equity financing. AssociationsJohn is a director of several private and public companies. He has served as a board member of different private clubs and charities and coached hockey and other children's teams. He is an avid squash player, golfer and all-round sportsman. He is married with three grown children. Recent Transactions Equity Financing Private Placements Public Underwritings Rights Offerings Stock Option Plans TSX Listings Debt Financing Secured Debt, Real Estate and Personal Property Security Mezzanine Debt Convertible Debt Acquisitions/Dispositions Letters of Intent Purchase Agreements Due Diligence Closing Arrangements Joint Venture/Venture Capital Capital Pool Companies including prospectus, listing and qualifying transactions Sourcing Investments Sourcing Capital Material Contracts including shareholder, partnership, co-ownership, franchise and distribution agreements Venture Capital Structuring including subscriptions, due diligence, shareholders security, employment, non-competition and confidentiality agreements, stock option plans and agreements, share appreciation rights plans

2 Responses

§ RandomDude wrote on September, 21st:

Awesome! I always hated having to change everything so that IE could display my sites correctly. Thank you so much for sharing.

§ Tripp wrote on September, 21st:

This isn’t working for me. Using Option 2, I get a JS error with IE6 and that’s about the weight of it.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>