Here is the research. Mordor itself says so:
http://support.microsoft.com/kb/306231
The plain word translation is that IE (on WinXP with SP2, to be precise)
won't load a .htc file unless it's served with the correct MIME type of
text/x-component . The Apache web server doesn't come with this
preconfigured out of the box; you have to put it there yourself, either
into the main configuration file httpd.conf (if you know what are you
doing and if you have access to it at all, which almost always isn't the
case on a shared server) or into a plain text file named exactly
'.htaccess' in the same directory where the .htc is served from. Done
that, you don't have to link to it: Apache itself will read that file
before serving any content from the directory.
There is one other thing that can go wrong with .htc stuff: while IE
does respect in general the specifications stating that the path to
files referred to in a stylesheet is relative to the stylesheet itself
(this means: if you have a css stylesheet in /css/global.css with a rule
like {background-image: url(image.gif);} the browser must get image.gif
from the css folder), when it comes to .htc files (maybe others too, but
I haven't noticed yet) IE makes a mess of it and looks for them all over
the place, mostly (not always) treating the path as relative to the html
file (who said IE is boring?). The simplest solution is to use the full
URL to point to the .htc (eg.: behaviour:
url(http://bioneutrix.com/css/iepngfix.htc); ).
That said, I noticed that you kinda gave up on the htc going rather the
javascript way. As I see it, the conditional comment should load
javascript/pngfix.js for versions of IE lower than 7, while the script
itself runs only for versions of IE higher or equal to 5.5 rewriting the
img element with a span with display: inline-block and the rest copied
from the original image with an AlphaImageLoader filter applied. Not the
simplest of solutions to debug, I guess.
Right now your problem in IE6 is that the javascript isn't loaded at
all, as far as I can see. I suspect the culprit is the conditional
comment - you wrote on line 14 <!--[if lt IE 7.]> : notice the dot after
the version number, stuff like this can throw IE off its tracks...
djn
Lori Lay wrote:
> Well look closer because you haven't followed the instructions. Pardon
> the terse tone, but we're not here to write your code for you...
>
> Anyway, have a look at the demo page
>
> http://www.twinhelix.com/css/iepngfix/demo/
>
> to see the change that you have to make to your CSS to get this
> working. Leave the .htaccess file alone - or more accurately, don't
> create one. That's an Apache configuration file and I wouldn't start
> messing with that until you do a little more research. You probably
> don't even need it for this anyway.
>
> Lori
>
> Hint: you have given your logo a class called logo, but there's no logo
> class in your CSS file...
--
-----------------------------------------
Dejan Kozina Web design studio
Dolina 346 (TS) - I-34018 Italy
tel./fax: +39 040 228 436 - cell.: +39 348 7355 225 skype: dejankozina
http://www.kozina.com/ - e-mail: [EMAIL PROTECTED]
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/