Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

PNG issues - images not displaying correctly in IE 6


Reply


4 Posts   3065 Views

Avatar
RichMcNabb

Community Member, 34 Posts

17 June 2010 at 5:04pm

I have been using a png fix (found here http://homepage.ntlworld.com/bobosola) outside a CMS for a while with no problems.

However I am having trouble trying to use any sort of PNG fix within SS and was wondering if anyone knew of one and could quickly explain the steps they did to implement it (i.e. registering the js file, path locations, etc)?

Thanks heaps :)

Avatar
stevanovich

Community Member, 60 Posts

17 June 2010 at 8:19pm

I tend to use iepngfix.htc which is easy to implement just put it in your theme/css folder or jscript folder with blank.gif and call it from your page.ss

<!--[if IE 6]>
      <style type="text/css">
img, div { behavior: url(themes/blackcandy/css/iepngfix.htc) }
         </style> <![endif]-->

Avatar
RichMcNabb

Community Member, 34 Posts

18 June 2010 at 9:43am

Thanks Stevanovich!! Managed to get it working in no time thanks very much for taking the time to post.

Below is information for others wanting to do the same:

1. Download iepngfix.zip from website - http://www.twinhelix.com

2. Add code to Page.ss page

<script type="text/javascript" src="themes/blackcandy/css/resources/iepngfix_tilebg.js"></script>

<!--[if IE 6]>
<style type="text/css">
       img, div, a { behavior: url(themes/blackcandy/css/resources/iepngfix.htc) }
</style>
<![endif]-->

3. The top script (iepngfix_tilebg.js) adds support for background repeat

4. Remember to add a (i.e. img, div, a) for links.

Hope this helps!!

- Rich

Avatar
kcd

Community Member, 54 Posts

7 February 2011 at 1:38pm

Thanks Rick

To anyone else doing trying this, be aware that fixing small repeated images can slow your page down to a holt.

In my case I placed the javascript call to iepngfix_tilebg.js in the [if IE 6] block and the CSS in ie6.css. In the CSS I only fixed a few key images (i.e. all 'a' tags and certain divs).

Cheers

Kevin