|CSS3 PIE Forums
|How to switch off PIE for IE7 (and below)?
|Page 1 of 1|
|Author:||RostokMcSpoons [ Wed Aug 29, 2012 6:24 am ]|
|Post subject:||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: pie.htc 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
|Page 1 of 1||All times are UTC - 7 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group