Client Side

All the fancy frizz

A PIE a day keeps IE at bay

Written by: Peter Fisher on October 3, 2012
Tagged under: , , , ,
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

I’ve been working on some upgrades to the Websomatic site  and was faced with a common issue with CSS3 and IE. I wanted to create a background gradient and I knew that some versions of IE do not support this CSS3 feature. I feared that I would have to create a fall back image which I could repeat. After some googling I found the PIE hack and was able to quickly add the gradient without jumping into Gimp or PhotoShop.

PIE is a small hack that makes Internet Explorer versions 6, 7, 8 and 9  capable of displaying certain CSS3  decorative features.  The current supported styling features are:

The PIE hack can either be activated via JavaScript or by adding PIE attributes into the style sheet. Unfortunately neither method is tidy but it does get the job done. As I posted last year, CSS hacks are not OK but this one is quite broad reaching and works quite well. As I mentioned in that post I would include the PIE hacks within an IE only style sheet instead of global style sheet. – Which I’m yet to do

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Peter Fisher is a web developer working in Gloucester UK. Founder of the digital agency Websomatic, author of this blog and the HowToCodeWell Youtube channel. Peter has over ten years of web development experience under his belt

Read all about Peter Fisher

Leave a Reply

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