[Grok-dev] Problems serving iepngfix.htc for transparent PNG in IE6

Sebastian Ware sebastian at urbantalk.se
Tue Dec 2 08:30:11 EST 2008


Variations of this seems to be the solution that is generally used.  
Many of the solutions I have seen replace the image with a blank gif  
which is given the correct dimensions. The iepngfix.htc is quite  
nicely packaged so I am using variations of that one now that I got it  
to work.

Mvh Sebastian

2 dec 2008 kl. 11.51 skrev Wichert Akkerman:

> We recently came up with a very simple bit of javascript that works
> wonders:
>
>    var ie55 = (navigator.appName == "Microsoft Internet Explorer" &&  
> parseInt(navigator.appVersion) == 4 &&  
> navigator.appVersion.indexOf("MSIE 5.5") != -1);
>    var ie6 = (navigator.appName == "Microsoft Internet Explorer" &&  
> parseInt(navigator.appVersion) == 4 &&  
> navigator.appVersion.indexOf("MSIE 6.0") != -1);
>
>    if (jQuery.browser.msie && (ie55 || ie6)) {
>        root.find("img[@src$=.png]").each(function() {
>            $(this).css({
>                    height: "0px",
>                    width: $(this).width()+"px",
>                    "padding-top" : $(this) .height()+"px",
>                    overflow : "hidden",
>                    filter :  
> "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + $ 
> (this).attr("src") + "', sizingMethod='scale')"
>                    });
>        });
>    }
>
> for some reason most people seem to want to wrap images in spans or  
> mess
> around with dummy images like the komodomedia.com snippet does.
>
> Wichert.
>
>
> Previously Sebastian Ware wrote:
>> I did some more research on this and one CAN use the iepngfix.htc
>> solution if one places the file on a server configured to support
>> the .htc file type and by using
>>
>>    behavior: url(http://full.address.com/path/to/iepngfix.htc);
>>
>> Since most people will run Grok behind a proxy webserver I guess this
>> isn't a biggie. IE6 on the other hand... one keeps on forgetting just
>> how much it sucks to have it around -- if it had been a car it would
>> have been banned from public roads decades ago...
>>
>> Mvh Sebastian
>>
>> 1 dec 2008 kl. 20.05 skrev Sebastian Ware:
>>
>>> I gave up on trying to serve iepngfix.htc. Using this solution
>>> instead:
>>>
>>> http://www.komodomedia.com/blog/2007/11/css-png-image-fix-for-ie
>>>
>>> Mvh Sebastian
>>>
>>> 1 dec 2008 kl. 19.27 skrev Sebastian Ware:
>>>
>>>> Thanks, but I am still struggling. Don't know how to affect the
>>>> content type served from the static folder. If anyone has ha  
>>>> complete
>>>> recipe for this problem it would be great. PNG-transparency is kind
>>>> of
>>>> important stuff...
>>>>
>>>> Mvh Sebastian
>>>>
>>>>
>>>> 1 dec 2008 kl. 18.22 skrev Leonardo Rochael Almeida:
>>>>
>>>>> I believe the solution to your problem goes through the following
>>>>> tidbit I found while reading the instructions for [1]:
>>>>>
>>>>> "you may have a MIME type problem. You must ensure your server is
>>>>> sending the correct MIME type of "text/x-component" for .HTC  
>>>>> files".
>>>>>
>>>>> [1] http://www.twinhelix.com/css/iepngfix/
>>>>>
>>>>> Cheers, Leo
>>>>>
>>>>> On Mon, Dec 1, 2008 at 14:38, Sebastian Ware
>>>>> <sebastian at urbantalk.se> wrote:
>>>>>> I need to use the PNG-transparency fix which involves using  
>>>>>> a .htc
>>>>>> file that is executed by IE5.5&6. I want to place iepngfix.htc in
>>>>>> the
>>>>>> static folder in order to avoid having to create a specific  
>>>>>> rewrite
>>>>>> rule for nginx. However, I have been trying to get this to work  
>>>>>> and
>>>>>> it
>>>>>> seems as though Grok won't deliver the .htc-file out of the  
>>>>>> static
>>>>>> folder in a way that works with IE.
>>>>>>
>>>>>> Question:
>>>>>> 1 Has anyone succesfully used the iepngfix.htc solution with  
>>>>>> Grok?
>>>>>> 2 How did you do it?
>>>>>>
>>>>>> Mvh Sebastian
>>>>>> _______________________________________________
>>>>>> Grok-dev mailing list
>>>>>> Grok-dev at zope.org
>>>>>> http://mail.zope.org/mailman/listinfo/grok-dev
>>>>>>
>>>>
>>>> _______________________________________________
>>>> Grok-dev mailing list
>>>> Grok-dev at zope.org
>>>> http://mail.zope.org/mailman/listinfo/grok-dev
>>>
>>
>> _______________________________________________
>> Grok-dev mailing list
>> Grok-dev at zope.org
>> http://mail.zope.org/mailman/listinfo/grok-dev
>
> -- 
> Wichert Akkerman <wichert at wiggy.net>    It is simple to make things.
> http://www.wiggy.net/                   It is hard to make things  
> simple.



More information about the Grok-dev mailing list