HELP!
- Started
- Last post
- 15 Responses
- Moo
Please can anyone help?
I'm trying to get this menu to work in IE5 using a png fix it looks perfect in firefox but for some reason its all gone wrong in IE
http://www.esaltoneurope.co.uk/d…
I've used the png fix from http://jquery.andreaseberhard.de…
cheers m00
- OhYeah0
Give me 2 mins...
- OhYeah0
I don't know why you want to bother with IE5 but this JS file always works for me:
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
document.writeln('<style type="text/css">img { visibility:hidden; } </style>');
window.attachEvent("onload", fnLoadPngs);
}function fnLoadPngs() {
var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
if (itsAllGood && img.src.match(/\.png$/i) != null) {
var src = img.src;
var div = document.createElement("DIV");
div.style.filter = "progid:DXImageTransform.Microso... + src + "', sizing='scale')"
div.style.width = img.width + "px";
div.style.height = img.height + "px";
img.replaceNode(div);
}
img.style.visibility = "visible";
}
}- Also you need to create a 1x1 pixel transparent gif and save it in your images folder.OhYeah
- OhYeah0
Remove the jQuery code for the moment and try it again.
- OhYeah0
Also just looking at your JS file and it seems that when you copied the code from QBN it curropted some of the code, copy the code into notepad or something like it and paste in back into the JS file.
This is what I am talking about: progid:DXImageTransform.Microsoâ...
- Moo0
seem to of done back to normal with IE using a light blue colour for transparent images
- Dancer0
It's beasue you have the PNG as a background image – there is no effective work around for this... I've tried
- Moo0
not sure if this is right but all of the code below is in blue
"progid:DXImageTransform.Microso... + src + "', sizing='scale')"
div.style.width = img.width + "px";
div.style.height = img.height + "px";
img.replaceNode(div);
}
img.style.visibility = "visible";
}
}
- OhYeah0
Well spotted Dancer, didn't see that :)
@Moo, Dancer is right, there is no effective work with PNG background images. What you could do is use .GIF's??
- Moo0
ok will give that a try shame theres no fix for this damit thanks for the help anyway OhYeah and Dancer
- Dancer0
Why do they have to be PNG's?
Just have them rectangular images – yes the hit area is larger but is this such a bad thing?
Unless you have an image in that header.
- OhYeah0
No problems Moo, another idea is not to use the buttons as background but as a rollover so the button images would be on the page and not in the CSS.
Just a personal note, I did a design years ago with a similar style of menu that you have done and the client was happy with the site till the day he wanted to add 5 more menu items so just keep in mind that the menu looks good now but if your client wants to add more content in the future you would have to change all the images...
- Dancer0
Hey Moo
This may help you :)
http://allinthehead.com/retro/69…