Forums
View unanswered posts | View active topics It is currently Wed Sep 03, 2014 1:01 am



Reply to topic  [ 3 posts ] 
 Using PIE in a conditional stylesheet 
Author Message

Joined: Tue Jul 27, 2010 10:21 am
Posts: 6
Post Using PIE in a conditional stylesheet
I've gotten PIE to work just fine, but I would like to use the CSS "behavior" rule in a conditional stylesheet, to avoid every browser having to download the 27K htc file. That, I have not gotten to work. I've used the conditional IE tags in my document head:

Code:
<!--[if !IE]>
<link rel="stylesheet" type="text/css" href="_assets/style-for-IE.css"/>
<!--<![endif]-->


Then, inside the IE style sheet, I have targeted the #element directly, and added the
Code:
behavior:url(_assets/PIE.htc);
rule. I've tried it relative to the html file (as instructed), and relative to the css file, neither of which work. The PIE.htc file happens to be in the same folder as the css files.

Is there a way to get that to work?

Thanks,
Jamie


Tue Jul 27, 2010 10:28 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1441
Post Re: Using PIE in a conditional stylesheet
This should be possible, but first a note: only IE recognizes the 'behavior' CSS property, so only IE downloads the .htc file. All other browsers will simply ignore it, so there's no download penalty. This might affect your decision to pull this out into a IE-only stylesheet.

That said, I think your conditional comment logic is flipped. The snippet you pasted is saying include the stylesheet if *not* IE.


Tue Jul 27, 2010 10:52 am
Profile

Joined: Tue Jul 27, 2010 10:21 am
Posts: 6
Post Re: Using PIE in a conditional stylesheet
HA! Good catch. Thanks!


Tue Jul 27, 2010 11:26 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 4 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.