Hello,
I'm struggling with the rendering of png images in IE and i would like to install a pngfix script to the head section but i don't know how to do it.

Comments

koneru.46@gmail.com’s picture

If you are planning to add javascript to the head section,you can add it through the .info file located in your theme folder. Refer to

http://drupal.org/node/171205#scripts

Place your code in a new .js file and add the line

scripts[] = myscript.js

This will add myscript.js to the head section.

cms66’s picture

Thank you, but i have to add this in the head section :

<style type="text/css">
img, div { behavior: url(iepngfix.htc) }
</style> 
koneru.46@gmail.com’s picture

copy html.tpl.php from drupal/modules/system/ directory to your theme directory.
In that file you can add the above code in the head section.

adam_b’s picture

could be to make a custom block with full HTML input, put the script in there and set the block location to be in the head - that's worked for me before, without needing to edit template files etc.

cms66’s picture

But a block is displayed in the body of the page, not in the head section. Perhaps you make a little confusion between the header and the head section.

adam_b’s picture

I do know the difference thanks, but in my case it worked fine in a block (this was javascript to prevent right-clicks on the page). JS doesn't necessarily need to be in the header.

cms66’s picture

koneru, thank you, it's exactly what i was looking for and it works.

StuV’s picture

With Drupal 7 when I copied html.tpl.php to the theme directory, the addition of a script was not reflected. I replaced that file in the Drupal/Modules/System/ directory with the addition added and it worked fine. Thanks for putting me on the right track koneru!

crazysix’s picture

Stop! That is not the right track. You are hacking core. Try the theme template again and be sure to clear cache.

crazysix
crazysix.com