Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 07-28-2008, 07:54 PM PNG Transparency...
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
Anyone have a permanent solution for IE < 7

(I am using IE 6 to test my pages) but looking for a transparency fix for any version of Internet Explorer that needs it...GOD I hate IE, but I don't know who else is using it, so I guess I will have to suffer w/ a fix for now. But why

Thanks!
-Brian
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-28-2008, 08:43 PM Re: PNG Transparency...
seocd's Avatar
Super Talker

Posts: 128
Name: Ryan
Trades: 0
look into the supersleight javascript. That is what we use on our website and it works for all versions of IE. It takes a bit of playing around with but it works.
__________________
SEO Compatible
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
seocd is offline
Reply With Quote
View Public Profile
 
Old 07-28-2008, 08:43 PM Re: PNG Transparency...
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Do a search for IE PNG fix, there are a couple of solutions - but they don't work for repeating transparent PNGs.

However, this is a new one: http://labs.unitinteractive.com/unitpngfix.php - supposed to work on repeating pngs.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-28-2008, 09:45 PM Re: PNG Transparency...
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
Thank you both LadynRed and seocd for the replies, I will give it a try

-Brian
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 07-28-2008, 09:54 PM Re: PNG Transparency...
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
I just tried it, and it doesn't work. the page loads and quickly dissapears. I noted just before the page went blank, the png was not transparent (white edges)...I tried removing the clear.gif image, and I got a box w/ the red x in replace of my png image.

Any other ideas? Or should I just recommend Firefox as the browser of choice?
-Brian
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 07-29-2008, 09:19 AM Re: PNG Transparency...
firebladeiii's Avatar
Average Talker

Posts: 26
Trades: 0
use the following code

HTML Code:
<span style="width:71px;height:25px; cursor:hand;display:inline-block;

/* the height and width should match those of the image */

filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='yourimage.png');    ">
<img style="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" 
src="yourimage.png" width="71" height="25" border="0" alt="">
</span>    
__________________
Thats it !

Please login or register to view this content. Registration is FREE
firebladeiii is offline
Reply With Quote
View Public Profile
 
Old 07-29-2008, 10:41 AM Re: PNG Transparency...
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
And, of course, that filter is EXACTLY what the javascript methods use!
Putting it inline with a span is pretty sloppy.

Brian, lets see the code involved, I have never had a bit of trouble with any of the PNG fix scripts.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 07-29-2008, 03:55 PM Re: PNG Transparency...
Banned

Posts: 421
Location: Boston, MA
Trades: 1
Look art this
http://homepage.ntlworld.com/bobosola/index.htm
webcosmo is offline
Reply With Quote
View Public Profile Visit webcosmo's homepage!
 
Old 07-29-2008, 08:19 PM Re: PNG Transparency...
Brian07002's Avatar
Defies a Status

Posts: 2,162
Name: ...
Location: ...
Trades: 0
Thanks for the replies, but I decided I am going to just stick to Firefox as the browser of choice for now, unless I get a higher percent of Microsoft IE users hitting my page. I am logging the users browser and resolution so that will tell all.

Thanks for the help otherwise!
__________________
Made2Own

Please login or register to view this content. Registration is FREE
Brian07002 is offline
Reply With Quote
View Public Profile
 
Old 08-13-2008, 05:43 AM Re: PNG Transparency...
Super Talker

Posts: 108
Name: Yelnats
Trades: 0
you can also use .gif if you want some tranparency, but .png? i think there will always be a problem in transparency when in IE... haha, i hate IE too but i got to be used to it...
seo-neon is offline
Reply With Quote
View Public Profile Visit seo-neon's homepage!
 
Old 08-13-2008, 10:57 AM Re: PNG Transparency...
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
Thanks for the replies, but I decided I am going to just stick to Firefox as the browser of choice for now, unless I get a higher percent of Microsoft IE users hitting my page.
I love Firefox as much as most of the people here, but the vast majority of people use a version of Explorer as their primary browser. It is wise to optimize for it.

PNG fixes aren't always perfect, however, so sometimes I send Jpegs and a slightly different layout to IE6.
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 08-13-2008, 11:23 PM Re: PNG Transparency...
Novice Talker

Posts: 10
Name: Michael lau
Trades: 0
you can use a javascript code in <head></head>
Code:
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])
function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
    var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
    var imgTitle = (myImage.title) ? 
               "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
    var imgStyle = "display:inline-block;" + myImage.style.cssText
    var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
    myImage.outerHTML = strNewHTML   
    }
}


function correctPNG()
   {
   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
        }
      }
   }
function alphaBackgrounds(){
   var rslt = navigator.appVersion.match(/MSIE (d+.d+)/, '');
   var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
   for (i=0; i<document.all.length; i++){
      var bg = document.all[i].currentStyle.backgroundImage;
      if (bg){
         if (bg.match(/.png/i) != null){
            var mypng = bg.substring(5,bg.length-2);
   //alert(mypng);
            document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
            document.all[i].style.backgroundImage = "url('')";
   //alert(document.all[i].style.filter);
         }                                               
      }
   }
}

if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
window.attachEvent("onload", correctPNG);
window.attachEvent("onload", alphaBackgrounds);
}
lht0747 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PNG Transparency...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.94995 seconds with 12 queries