This is a discussion on PNG Image rendering within the Graphic Design forums, part of the Webmaster Discussion category; I'm confused, why don't PNG image render properly in any IE browser, i've tried using gif as the image has ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Calendar | Search | Today's Posts | Mark Forums Read |
| |||||
| I'm confused, why don't PNG image render properly in any IE browser, i've tried using gif as the image has now background but a gif is not sharp enough, the PNG renders perfect in FF 3 and i need it to do like wise in Ie, any work arounds or suggestions? |
| |||||
| PNG in Windows IE though you'll still probably need to hack any css you're got with pngs in them (assuming what you're on about is transparency) ?
__________________ IT Books.ie | Computer Books Recent Work | The Dropped.IE Domain List | Devine Building | Children's Festivals in Ireland | Galway Hot Yoga | Freelance Jobs African Safari Holiday Blog | James Larkin Work | Web Design Dublin, Ireland - Web Development Dublin, Ireland |
| |||||
| |
| |||||
| Try 8 bit PNG's - Creating 8-bit Alpha Transparent PNG Files - cant find a better link to show you but they work fine for me for most of my requirements...
__________________ My Blog thing! |
| |||||
| Quote:
|
| |||||
| You are, of course, correct. |
| |||||
| Quote:
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]-->
|
| |||||
| Sorted, i was adding the image via CSS, just changed it too an image tag. Thanks for the help. |
| Tags |
| image, png, rendering |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Another rendering issue | bucks | Coding Help | 6 | 01-06-2007 07:09 PM |
| CSS Image Positioning | borderfox | Coding Help | 13 | 08-05-2007 07:05 PM |
| CSS Image Pop Up | Paolo | Coding Help | 11 | 06-05-2007 12:05 AM |
| Page rendering | ph3n0m | Webmaster Discussion | 5 | 24-01-2007 09:08 PM |
| Image resources | dave | Webmaster Discussion | 7 | 12-08-2006 12:43 PM |
| ||||
| | ![]() | |||
| | ![]() | |||