View unanswered posts | View active topics It is currently Sat Oct 19, 2019 7:20 am

Reply to topic  [ 1 post ] 
 How to switch off PIE for IE7 (and below)? 
Author Message

Joined: Wed Aug 29, 2012 3:47 am
Posts: 7
Post How to switch off PIE for IE7 (and below)?
I have a web site I'm working on with multiple stylesheets (for product brand badging, high contrast modes etc), a gazillion classes, and not much time to improve it. (Oh, and I'm still learning the ropes with CSS, JS and C#)

PIE does a great job on adding the shadows, gradients and rounded corners that I need, but unfortunately the extra dynamically generated divs make a mess of the formatting when in IE7 (it has a horrible mix of floats and absolutely positioned elements that fall apart as soon as anything is changed). I also get some glitching with gradients in table cells. The easiest approach is therefore to switch PIE off for IE7 (and below).

Is there an easy way to do this? The obvious approach is to replace the classes on page load with IE7-optmized ones (by taking out the behavior: line?), but I don't want to proliferate classes within already very large stylesheets, so I'd like to do it programmatically. (Preferably in C# rather than JS)

Any thoughts would be much appreciated :)

Edit: D'oh! Well it's as simple as using the old IE hack, and passing 'none' as the URI... I'm not sure 'none' is coded for, but it looks right and seems to do the job!
*behavior: none;    /* Switch off PIE for IE6/7

Wed Aug 29, 2012 6:24 am
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.