IE CSS, where to put the .htc file???

Put it in the same folder as your css file. The syntax url(csshover.htc) will look for the file in the same folder as itself.

Thanks,

Sayoyo,

Change it to read:

behavior: url(/stylesheets/csshover.htc);

Also, inside csshover.htc, it might refer to a ‘blank.gif’ somewhere. If so, make sure this file exists in your public/images directory and change the url within csshover.htc to ‘/images/blank.gif’

Mine is called iepngfix.htc and it has this as line 14: if (typeof blankImg == ‘undefined’) var blankImg = ‘/images/blank.gif’;

Thanks,

It might be worth pointing out that it was failing because of Routes, not CSS. The CSS was behaving exactly as it should on both counts. Basically, you have routes to your assets setup for you behind the scenes. At least, I would put money on this guess.. check your logs with out the absolute path and see if there are routing errors.

In other news, you might like to know that you can do CSS menus with *standard* JS fallbacks for IE. Suckerfish has been around for a good few years or more. There are surely other alternatives.

I think I used an .htc file once like four years ago..

I believe Sayoyo is using the .htc for fixing PNG alpha transparency in IE6, not for CSS menus. There are other alternatives with pure JS to do the fix, but you have to re-run it again any time a new transparent PNG is inserted into the page. This is the easiest, most unobtrusive approach I’ve found - a css one-liner ( behavior: url( iepngfix.htc) ) that gets applied to any element that applies to the css selector. No special JS to run in the onload event of your pages, or when a new image is created or inserted in the DOM, as long as a css style is defined for it - it just works.