views:

181

answers:

4

Is there any PNG-fix for IE 6 and without modifying current HTML, CSS and image name?

any javascript way.

I can add any thing in <head>........</head> but can't modify anythings inside <body>.....</body>.

in one shot i want to make transparent all png transparent.

+2  A: 

As I just learned, this script will make IE behave like a standards compliant browser, including PNG fixes.

Kyle Sevenoaks
i need without modifying current css and HTML
metal-gear-solid
Well good luck then.
Kyle Sevenoaks
ok i got your point . I can do via this method for all PNG `var IE7_PNG_SUFFIX = ".png";`
metal-gear-solid
A: 

This can be fix in 2 way

  1. There is a fix file called png-fix.js, just get from net and include it before your </body> tag.

  2. Better you can change you png file format into png-8 format via the photo-shop tool.

VAC-Prabhu
#2 is not a solution: the fix is also needed in case of 8-bit PNG with alpha transparency. http://www.sitepoint.com/blogs/2007/09/18/png8-the-clear-winner/
Marcel Korpel
+2  A: 

OK here's a question: if you can't modify the HTML, CSS or image at all, what the heck can you modify? The raw network stream coming from the server?

DisgruntledGoat
i can add anything inside `<head>` but not inside `<body>`
metal-gear-solid
In that case, Kyle's solution will work, just put the javascript in the head of the document.
DisgruntledGoat
+1  A: 

My preferred PNGFix is DD_belatedPNG. It is easy to use, example from the page:

<!--[if IE 6]>
<script src="DD_belatedPNG.js"></script>
<script>
  /* EXAMPLE */
  DD_belatedPNG.fix('.png_bg');

  /* string argument can be any CSS selector */
  /* .png_bg example is unnecessary */
  /* change it to what suits you! */
</script>
<![endif]-->

You can set that .png_bg selector to whatever you see fit. Perhaps you want to replace all of the headings on a page: DD_belatedPNG.fix('h1,h2,h3');

akamike
+1 This is also a good solution
metal-gear-solid