CodeIgniter Forums
iePNGFix and Code Igniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: iePNGFix and Code Igniter (/showthread.php?tid=16631)



iePNGFix and Code Igniter - El Forum - 03-12-2009

[eluser]Marcel Karras[/eluser]
Hello,

is there anyone aware of using iePNGFix in combination with Code Igniter? Due to the fact that iePNGFix is a .htc file that get's called by the IE when a markup element defines the "bahavior" property to point to that .htc file, I have to define where to find this file. Using the url() function inside CSS seems to work only by using absolute URLs. So if there's a server root path change one will have to edit the "behavoir" property. As that's no option for me, I tried relative URLs. My .htc file and the referring css file are both in the same directory. But if I address the URL to...
Code:
url('./file.htc')
...it will not be found. Only absolute URLs seem to work.

Can someone help me on that?

Greetings.


iePNGFix and Code Igniter - El Forum - 03-12-2009

[eluser]TheFuzzy0ne[/eluser]
Welcome to the CodeIgniter forums!

Does:
Code:
url('file.htc');

not work?


iePNGFix and Code Igniter - El Forum - 03-12-2009

[eluser]gvillavizar[/eluser]
Why don't you use the url helper?

Something like:

Code:
$this->load->helper('url');

// And then you can use it like
echo base_url() . 'file.htc';

With the htc file being on root.


iePNGFix and Code Igniter - El Forum - 03-12-2009

[eluser]gyo[/eluser]
I guess Marcel is not referring to CI's url() function but the css property, right?

like this:

Code:
img, div { behavior: url(../../iepngfix.htc) }

In my case i have the css file in this position: assets/css/style.css
And it works great... Wink

Hope it helps!


iePNGFix and Code Igniter - El Forum - 03-12-2009

[eluser]TheFuzzy0ne[/eluser]
Aaah! Well done for spotting. I knew I was missing something as usual...