Jump to:

22976 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » PNG issues - images not displaying correctly in IE 6

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

Page: 1
Go to End
Author Topic: 2768 Views
  • RichMcNabb
    Avatar
    Community Member
    34 Posts

    PNG issues - images not displaying correctly in IE 6 Link to this post

    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

  • stevanovich
    Avatar
    Community Member
    59 Posts

    Re: PNG issues - images not displaying correctly in IE 6 Link to this post

    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]-->

  • RichMcNabb
    Avatar
    Community Member
    34 Posts

    Re: PNG issues - images not displaying correctly in IE 6 Link to this post

    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

  • kcd
    Avatar
    Community Member
    54 Posts

    Re: PNG issues - images not displaying correctly in IE 6 Link to this post

    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

    2768 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.