1

I am lost at using PIE for IE ...

http://jsfiddle.net/XBzvL/

div {
  background: red;
  color: #fff;
  border-radius: 10px;
  behaviour: url("http://jiewmeng1.kodingen.com/playground/PIE.htc");   
}

why doesn't it work?

Drew Gaynor
  • 8,292
  • 5
  • 40
  • 53
JM at Work
  • 2,417
  • 7
  • 33
  • 46

1 Answers1

1

You need to have the HTC on the same site that the page is sitting on. There's some security stuff that keeps IE from loading HTCs from different domains. (This means your stuff probably won't work in jsFiddle.) The domain name has to be identical, and IIRC even the protocol has to match.

You'll also need to configure your server to transfer the HTC with a MIME type of "text/x-component". (This may have already been done for you.)

Just noticed, too...you'll need to change "behaviour" to "behavior". :)

cHao
  • 84,970
  • 20
  • 145
  • 172
  • Ok, I tried creating on my test server, http://jiewmeng1.kodingen.com/playground/pie/ it still does not work. I also have a `.htaccess` file with `AddType text/x-component .htc` – JM at Work Mar 22 '11 at 05:20
  • Oh...it's `behavior`, not `behaviour`. – cHao Mar 22 '11 at 06:31
  • thanks! but what does pie do to the background, it became black – JM at Work Mar 22 '11 at 06:41
  • Try adding ` ` to the page. IE tends to act up something horrible when it's in quirks mode. – cHao Mar 22 '11 at 06:52
  • sorry again ... that didn't change anything? in fact I tried adding the whole Notepadd++ HTML5 snipplet. **UPDATE**: it appears its because PIE doesn't understand what color names like orange are ... – JM at Work Mar 22 '11 at 07:01
  • Yeah, i was just about to add that. Was experimenting with the file locally, and when i changed "orange" to "#ff0000", the div turned red. – cHao Mar 22 '11 at 07:06