Announcement

Collapse
No announcement yet.

IE 6 Png Fix

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    IE 6 Png Fix

    Hi, were using some pngs on our site and when viewed in IE6 there’s no transparency. I found a fix on the web for this (http://homepage.ntlworld.com/bobosola/pnghowto.htm) which works on a standard HTML page. When I put this into actinic it does nothing when previewing the web page or uploading the site. Any help would be much great.

    Thanks.
    http://www.roksport.com
    http://www.roksportsurf.co.uk
    http://www.roksportdarts.co.uk
    http://www.a1rugby.co.uk

    #2
    it depends on how much time you want to devote to supporting ie6.

    my compromise would be to use gif/jpg if you feel the layout is that broken for ie6.

    Comment


      #3
      Thanks for the prompt reply. should that option be ticked or unticked? it was unticked when I checked.
      When ticking the option it didnt seem to make a difference when using the preview page feature.

      Thanks.
      http://www.roksport.com
      http://www.roksportsurf.co.uk
      http://www.roksportdarts.co.uk
      http://www.a1rugby.co.uk

      Comment


        #4
        the link is http://www.roksportsurf.com its on my main page Im trying to fix the error to start with. You will notice a box grey box around the menu, and on the titles there are grey corners. The design was implented by some previous staff so were not really sure where the PNGs have been added in.

        Thanks.
        http://www.roksport.com
        http://www.roksportsurf.co.uk
        http://www.roksportdarts.co.uk
        http://www.a1rugby.co.uk

        Comment


          #5
          I changed the link and made sure the file was included in the additional files but it still doesnt work.
          http://www.roksport.com
          http://www.roksportsurf.co.uk
          http://www.roksportdarts.co.uk
          http://www.a1rugby.co.uk

          Comment


            #6
            for a quick-fix, try adding the code to ActinicExtras.js instead (close Actinic before changing. Change, Open Actinic and upload)

            Downside of doing it this way is that it'll need to be re-added after each upgrade/patch, but it should work.
            My png hack is done this way (although I haven't checked that the code is the same)
            Tracey

            Comment


              #7
              Long live the gif...............

              Comment


                #8
                Originally posted by leehack View Post
                Long live the gif...............
                animated, of course
                Tracey

                Comment


                  #9
                  Originally posted by TraceyHand View Post
                  for a quick-fix, try adding the code to ActinicExtras.js instead (close Actinic before changing. Change, Open Actinic and upload).
                  Still not getting any luck, doing this just seemed to cause a javascript error on the page. can anyone think of a reason why it isnt working?

                  thanks.
                  http://www.roksport.com
                  http://www.roksportsurf.co.uk
                  http://www.roksportdarts.co.uk
                  http://www.a1rugby.co.uk

                  Comment


                    #10
                    any reason why you wont use a gif?

                    Comment


                      #11
                      I could'nt tell you, previous staff added the images to the site, but wouldnt IE6 handle gif transparency the same as png? and still leave a grey box?
                      http://www.roksport.com
                      http://www.roksportsurf.co.uk
                      http://www.roksportdarts.co.uk
                      http://www.a1rugby.co.uk

                      Comment


                        #12
                        wouldn't have thought so... but if its a case of converting one image to gif and trying it out - it might be worth it.

                        If you had this problem with ie8 i'd say spend the time to sort it out with png as it might be indicative of other issues, but MS have dropped support for ie6 so its on its way out the door so you have to decide whether it is worth making this much effort to support a dead duck.

                        I haven't got ie6 so cant see the extent of the problem

                        Comment


                          #13
                          gifs have no issues like IE6 with PNGs, until IE6 is dropped, stick to gifs. PNGs are the future though for sure.

                          Comment


                            #14
                            I tend to agree with all that has been said about not wasting too much time on IE6, but in case anyone else needs to do this, here is a fix:

                            Paste this code directly into the <head> of your Actinic template and untick Compact HTML/CGI in Design Options:

                            Code:
                            <!--[if lt IE 7]>
                            <script language="JavaScript">
                            function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
                            {
                               var arVersion = navigator.appVersion.split("MSIE")
                               var version = parseFloat(arVersion[1])
                               if ((version >= 5.5) && (document.body.filters)) 
                               {
                                  for(var i=0; i<document.images.length; i++)
                                  {
                                     var img = document.images[i]
                                     var imgName = img.src.toUpperCase()
                                     if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
                                     {
                                        var imgID = (img.id) ? "id='" + img.id + "' " : ""
                                        var imgClass = (img.className) ? "class='" + img.className + "' " : ""
                                        var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
                                        var imgStyle = "display:inline-block;" + img.style.cssText 
                                        if (img.align == "left") imgStyle = "float:left;" + imgStyle
                                        if (img.align == "right") imgStyle = "float:right;" + imgStyle
                                        if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
                                        var strNewHTML = "<span " + imgID + imgClass + imgTitle
                                        + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
                                        + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                                        + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
                                        img.outerHTML = strNewHTML
                                        i = i-1
                                     }
                                  }
                               }    
                            }
                            window.attachEvent("onload", correctPNG);
                            </script>
                            <![endif]-->
                            It doesn't work if the PNG files are background images but works otherwise.
                            Actinic Web Design | Actinic Templates

                            Comment


                              #15
                              I found this after hours of searching and it proved to be a simple fix that solved all of my problems with PNG's in IE 6.

                              PNG's were being used as click-able overlays for objects such as video, flash and in most cases just as standard images.

                              The problem with the AlphaImageLoader based fixes (apart from the obvious conditional commenting upload) were that the click-able area was only the visible part of the PNG, not too effective for our needs.

                              http://www.twinhelix.com/css/iepngfix/

                              Hope it helps.
                              Dave

                              Comment

                              Working...
                              X