| Author |
Message |
|
modio
Joined: Tue Jan 17, 2012 11:19 am Posts: 4
|
 PIE.htc on IE7 - Problem with CTRL/+ & CTRL/-
I have a DIV which has a border and contains some text. With IE7, when I do CTRL/+ & CTRL/- the size and position of the box both shrink and expand more than the rest of the web page - which means that the box no longer surrounds the text. IE8 works OK, but IE7 doesn't. (Both work OK when I shrink & expand the page size.)
The problem can easily be reproduced as below. (I've stripped out the usual conditional stuff.)
Any help or ideas would really be appreciated!
=============================================== <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML> <HEAD> <META CONTENT="text/html; charset=utf-8" HTTP-EQUIV="content-type"> <STYLE TYPE="text/css"> div.TEST { border:6px solid green; background-color: #f0fff0; border-radius: 15px 15px; box-shadow: 10px 10px 10px #000000; behavior: url(scripts/pie.htc); } </STYLE> </HEAD> <BODY> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <BR> <P>Some text .......................</P> <DIV CLASS="TEST"> <P>Some more text .......................</P> </DIV> <P>More text still .......................</P> </BODY> </HTML>
|
| Tue Jan 17, 2012 11:48 am |
|
 |
|
jason
Joined: Wed Jul 14, 2010 11:46 am Posts: 1396
|
 Re: PIE.htc on IE7 - Problem with CTRL/+ & CTRL/-
|
| Tue Jan 17, 2012 6:25 pm |
|
 |
|
modio
Joined: Tue Jan 17, 2012 11:19 am Posts: 4
|
 Re: PIE.htc on IE7 - Problem with CTRL/+ & CTRL/-
Thank you.
1)known-issues/#zoom “PIE does not currently work when applied to the <body> or <html> elements. Try using a wrapper div around the body contents and applying your CSS3 styles and PIE.htc to it instead.” I put the body contents inside a <DIV>. It didn't help. 2)PIE/issues/79 “When using the browser zoom function, the background image(s) do not get scaled to match the zoom factor. ” I don't have a background image. 3)And in any case, as I understand it these two issues affect both IE7 & IE8. My problem is specific to IE7; IE8 works OK.
It bothers me that my CSS & HTML (with the extra <DIV>) are just about as simple as you can get, and yet - for me at least - PIE.htc fails in the most straightforward of circumstances: CTRL/+ in IE7.
Does anyone out there have PIE.htc working correctly with CTRL/+ in IE7? And if so could they perhaps post some code which works OK, so that I can use this as a base for my own development?
Thanks again!
|
| Wed Jan 18, 2012 4:02 am |
|
 |
|
jason
Joined: Wed Jul 14, 2010 11:46 am Posts: 1396
|
 Re: PIE.htc on IE7 - Problem with CTRL/+ & CTRL/-
I understand yours is specific to IE7, I was just pointing you to the known issue description and the ticket showing that work is being done to fix it. The background scaling part has already been fixed, but the IE7 measurement issue remains as you can see in the comments in the ticket.
FWIW, this is actually a bug in IE's engine where it reports incorrect measurements, not a bug in PIE, but we're trying to find a workaround. If you are able to help in the effort that would be appreciated.
|
| Wed Jan 18, 2012 12:20 pm |
|
 |
|
jason
Joined: Wed Jul 14, 2010 11:46 am Posts: 1396
|
 Re: PIE.htc on IE7 - Problem with CTRL/+ & CTRL/-
Oh and BTW you were reading the wrong section on the known issues page -- i was pointing you to the section on zooming, but you read the section on problems with certain elements. That's irrelevant to your scenario, unless you are indeed trying to style the body element.
|
| Wed Jan 18, 2012 12:25 pm |
|
 |
|
modio
Joined: Tue Jan 17, 2012 11:19 am Posts: 4
|
 Re: PIE.htc on IE7 - Problem with CTRL/+ & CTRL/-
Jason, thanks for your response and very clear explanation. I figured out that the problem was most likely to be in IE7, and not PIE, but it's nice to have that confirmed. It's also nice to know that it wasn't me doing something dumb!
At least I now know exactly where I stand, and that there's no workaround that I can apply - other than using boxes without rounded corners and shadows in IE7, which is what I think I'll go for.
I do hope that you manage to find a workaround.
|
| Thu Jan 19, 2012 6:41 am |
|
 |
|
modio
Joined: Tue Jan 17, 2012 11:19 am Posts: 4
|
 Re: PIE.htc on IE7 - Problem with CTRL/+ & CTRL/-
Jason asks if there is any way in which I might be able to help in the effort. Well, I have approached the challenge as a mathematician & physicist rather than as a software engineer, and have done some experimentation and made some measurements. And it turns out that the metrics of the IE7/PIE bug are very straightforward.
FIRST - HOW NON-PIE-ENABLED ELEMENTS ARE TREATED IN IE7 (CORRECT): 1 click of CTRL/- reduces all dimensions of elements to 90% of their original size; 2 clicks of CTRL/- reduces all dimensions of elements to 80% of their original size; 3 clicks of CTRL/- reduces all dimensions of elements to 70% of their original size .... and so on.
1 click of CTRL/+ increases all dimensions of elements to 110% of their original size; 2 clicks of CTRL/+ increases all dimensions of elements to 120% of their original size; ... and so on.
NOW - HOW PIE-ENABLED ELEMENTS ARE CURRENTLY TREATED IN IE7 (THE BUG): 1 click of CTRL/- reduces all dimensions of elements to 81% of their original size; 2 clicks of CTRL/- reduces all dimensions of elements to 64% of their original size; 3 clicks of CTRL/- reduces all dimensions of elements to 49% of their original size .... and so on
1 click of CTRL/+ increases all dimensions of elements to 121% of their original size; 2 clicks of CTRL/+ increases all dimensions of elements to 144% of their original size; ... and so on.
Put simply, all PIE-enabled elements are currently being scaled twice in IE7. Reverse the effect of one of these scaling operations, and PIE will function perfectly in IE7.
The best way of making this reversal will clearly depend on exactly how the code is structured (and this is well beyond my pay grade!). One approach would be to count the net number of CTRL/+ and CTRL/- clicks, and then, when IE7 is being used, simply apply the following correction to all the dimensions of all PIE-enabled elements:
Net 1 “-” click, divide all dimensions by 0.90 Net 2 “-” clicks, divide all dimensions by 0.80 Net 3 “-” clicks, divide all dimensions by 0.70 ... etc
Net 1 “+” click, divide all dimensions by 1.10 Net 2 “+” clicks, divide all dimensions by 1.20 Net 3 “+” clicks, divide all dimensions by 1.30 .... etc
Net 0 “+/-” clicks, divide all dimensions by 1.00
Best regards
Les
|
| Sat Jan 21, 2012 5:52 am |
|
 |
|
jason
Joined: Wed Jul 14, 2010 11:46 am Posts: 1396
|
 Re: PIE.htc on IE7 - Problem with CTRL/+ & CTRL/-
Thanks for the analysis.
|
| Sat Jan 21, 2012 2:32 pm |
|
|