IE CSS, where to put the .htc file?

HI,

I try to create a very simple menu with CSS in IE (and I always use
firefox) but I have to make the web application compatible with IE :frowning:

I realize the :hover is not working on

    and
  • in IE, I have to
    put a line in the body in css

    body {behavior:url(csshover.htc);}

    and I have not idea where should I put this file, (the file contains JS
    that allow the :hover on any element in html… the file is form Eric
    meyer.

    does some one know where and how should I put the file???

    Thanks you very much

    Sayoyo

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,

Scott B.
Electro Interactive, Inc.
Office: 813-333-5508
http://www.ElectroInteractive.com http://www.electrointeractive.com/

On 3/8/07, sayoyo [email protected] wrote:

body {behavior:url(csshover.htc);}


Posted via http://www.ruby-forum.com/.


Scott B.
Electro Interactive, Inc.
Office: 813-333-5508
http://www.ElectroInteractive.com

Hi, Scott

I have already try to put it in the public/stylesheets/, but it doesn’t
work…

any idea?

thanks you very much!!!

Sayoyo

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,

Scott B.
Electro Interactive, Inc.
Office: 813-333-5508
http://www.ElectroInteractive.com

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…

On 3/8/07, Seth Thomas R. [email protected] wrote:

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 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.


Scott B.
Electro Interactive, Inc.
Office: 813-333-5508
http://www.ElectroInteractive.com

Hi, Scott,

by adding “/stylesheet/”, now the css is able to find the .htc, Thanks
you very much!!! and another thing I have changed is the .htc file
given by Eric Meyer, he used :media => ‘screen’, and I was using :media
=>‘all’, it has created a problem too, now I have changed my code, my
menu is shown correctly now,

Thanks you very much for your help!!!

Sayoyo

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs