views:

38

answers:

2

I have come across this website:

http://www.fetchak.com/ie-css3/

It seems to work when I enter the URL in my IE6, then the "cat" in the picture further down has a "shadow" effect around it.

However, I follow instructions but can't get it to work.

I have a php file, which dynamically outputs images of classifieds. These images has a class attribute attached to them: (something like this below)

  $display_table.="<img src='-----' class='shadow'>";
  echo $display_table;

The class shadow is in an external file which is included. Here is the class:

.shadow{
    border:none;
    box-shadow: -2px 2px 4px #666;
    border-radius:10px;
    behavior: url(ie-css3.htc);
}

according to the website, this should work. But it doesn't... Is it because I am applying it to an image? Or maybe because it is a php file? Any ideas?

Thanks

A: 

Try adding position: relative; to your css statement. If it's anything like CSS3 PIE then you'll probably need to add this.

You might also want to check if the .htc file is being called with the correct header. This, again, is an issue that may occur with CSS3 Pie which may (or may not) apply here.

simnom
Didn't work either...
Camran
Are you able to post online so I can take a peek?
simnom
actually no I am not online at the moment
Camran
Thinking out load now. It's not a doctype issue. The img tag you've posted wouldn't be a valid xHTML tag as you don't end with />. Just a thought.
simnom
@Camran - 'actually no I am not online at the moment' - that might be the best response I've ever seen on a forum...
Paddy
A: 

the path is relative to the HTML file being viewed, not the CSS file it is called from.

source by similar tool.

so giving behavior: url(ie-css3.htc); in fact you mean that you have the htc file in the same folder with the webpage. If it's not in the same folder, fix the path to be relative to the page, not the css file.

Sotiris
the path is correct...
Camran