Forums
View unanswered posts | View active topics It is currently Mon Nov 11, 2019 6:20 pm



Reply to topic  [ 8 posts ] 
 PIE inst ignored while printing in IE7 
Author Message

Joined: Tue Sep 07, 2010 9:54 am
Posts: 2
Post PIE inst ignored while printing in IE7
I have a different stylesheets for screen and printing, and on print stylesheet I don't want rounded corners or colored backgrounds.

I specified different stylesheet for different media like this:

Code:
<link rel="stylesheet" type="text/css" href="layout.css" media="screen" >

<link rel="stylesheet" type="text/css" href="print.css" media="print" >


I works fine except on < IE7, no matter what I do IE7 always ends up reading the styles that refer PIE.htc on the layout.css file.

I tried defining the style only for media type screen like this:
Code:
@media screen {
   #Content{
      background-color: #F9FAFA;
      border: 4px solid #EEEEEE;
      border-radius: 20px;
      -webkit-border-radius: 20px;
      -moz-border-radius: 20px;
      position: relative;      
      behavior: url(PIE.htc);    
   }
}


But the browser always ends up applying the PIE.htc behaviour.

I tried re-calling PIE.htc on the print style to override the style:
Code:
#Content{
   background: #FFF !important;
   border: none !important;
   border-radius: 0 !important;
   -moz-border-radius: 0 !important;
   -webkit-border-radius: 0 !important;   
      
   behavior: url(PIE.htc);
      
}


But it still doesn't work, I still get rounded corners and the colored background :\.

Anybody else having the same problem? I'm really stuck on this one....


Tue Sep 07, 2010 10:07 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1452
Post Re: PIE inst ignored while printing in IE7
I hadn't considered print-specific styles before. Nice catch. I've opened ticket http://github.com/lojjic/PIE/issues/issue/76 to track this.

I'm trying to think of a temporary workaround for you but can't think of anything right now. Out of curiosity, what happens if in the print stylesheet you set behavior:none?


Tue Sep 07, 2010 12:02 pm
Profile

Joined: Tue Sep 07, 2010 9:54 am
Posts: 2
Post Re: PIE inst ignored while printing in IE7
Hi Jason, thanks for replying.


If I apply behavior:none in the print stylesheet it removes the border radius defined in the screen stylesheet also.


Wed Sep 08, 2010 3:03 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1452
Post Re: PIE inst ignored while printing in IE7
Whoa, that makes no sense whatsoever. Silly IE!

Note there's another topic in the forum now about printing; still no solutions but it sounds like the issue is larger than I thought from this post. Hopefully I'll find some time to tackle this before the beta3 release.


Wed Sep 08, 2010 9:45 am
Profile

Joined: Thu Feb 10, 2011 4:33 pm
Posts: 1
Post Re: PIE inst ignored while printing in IE7
Was this ever resolved? I am seeing the same in IE7 and IE8.

jyg


Thu Feb 10, 2011 4:36 pm
Profile

Joined: Fri Mar 11, 2011 9:49 am
Posts: 8
Post Re: PIE inst ignored while printing in IE7
jason wrote:
I hadn't considered print-specific styles before. Nice catch. I've opened ticket http://github.com/lojjic/PIE/issues/issue/76 to track this.

I'm trying to think of a temporary workaround for you but can't think of anything right now. Out of curiosity, what happens if in the print stylesheet you set behavior:none?


As mentioned previously, having behavior :none ; overrides the screen media type as well.

Also changing the order of the stylesheet's means the last stylesheet loaded has preference. So if print is print.css is loaded last using behavior:none then that means the screen stylesheet also displays none. Whreas if screen.css is loaded last then the background in my case is still loaded into print.

This wouldn't be such an issue but when the .htc file is enabled the print preview etc is all scrambled with the values being displayed separate to the content so hence making a print stylesheet necessary to try and remove this styling.


Fri Mar 11, 2011 9:56 am
Profile

Joined: Fri Mar 11, 2011 9:49 am
Posts: 8
Post Re: PIE inst ignored while printing in IE7
ok, I have installed the latest beta (v3) and this works much better for printing. Thankyou.

The main issue I have now is that I get an error message display in explorer when I print a page along the lines of:

An error has occurred in the script on this page.

Line #
Char #
Error Object does n't support this property or method
Code 0

URL mydomain../../../PIE.htc

Do you want to continue running this script on this page?


Fri Mar 11, 2011 12:14 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1452
Post Re: PIE inst ignored while printing in IE7
Yes that error is a known issue. Try the build attached to this thread, which should fix it: viewtopic.php?f=3&t=313&start=10

I'm trying to get a beta4 release together soon which will have this fix in it.


Fri Mar 11, 2011 12:26 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: Google [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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.