views:

47

answers:

3

Hi all

I am having a real headache. I have written a small and simple menu which employs simple animation (fade in/fade out) powered by jQuery.

My issue is that the animation, when bviewed in ie8 looks awful - while the animation is running big ugly black borders are visible around the text (take a look at the link below you will see what I mean).

The issue is further compounded by the fact that it renders and animates absolutely perfectly in FF, Chrome and Safari.

Now, as you will see from the page I am an experienced web developer and as such am well used to IE quirks, but I cannot find the cause of this particular issue.

The page can be viewed here

Any ideas anyone??

Si

EDIT: As requested, the CSS (although you could see it using Firebug) can be downloaded here

enter code here
+1  A: 

It's an anti-aliasing issue. IE is ant-aliasing over the background color during animation, which is black in this case.

Try this change to your nav class:

.nav  {
    background: #D0D0D0 url("../images/menu_plain_top.png") no-repeat scroll 0 0;
}

UPDATE: This post is having a similar issue

Sonny
Can you explain the concept of aliasing?
Hristo
Sonny, that sounded great, but have added the amendment and even tried adding a background-colour value of the same, but to no effect. Also not sure why IE thinks the backgrounf color is black... in the style.css file it is clearlly set to #D0D0D0...
Simon S
I should have said 'anti-aliasing'. I updated my post. Here's an informative article: http://szafranek.net/works/articles/font-smoothing-explained/
Sonny
@Simon S - looking into it. I have dealt with this before and I thought the background color was the issue.
Sonny
Sonny, not sure if this helps but I think it might be a PNG issue. I saved the image in Photoshop as PNG-24 to preserve trnasparency. Have re-saved it as JPG with a suitable background layer and the issue seems to have gone away - now have a load more issues about layer ordering but I think I can resolve those - does this sound plausable?? I know IE has some serious issues with PNG handling...
Simon S
Sorry Simon, I overlooked the fact that you were using PNGs. I ran into a similar issue with the anti-aliasing of text a few years ago, where the edges would look blocky rather than smooth. I'm pretty sure the background color fix is what took care of that issue, but it's been a while.
Sonny
+1  A: 

I think you're running into the IE8 png fading issue. It does not blend semi-transparent png pixels correctly when combined with a simple opacity filter. To combine the opacity filter with semi-transparent pngs, you have to use the oldschool AlphaImageLoader filter. I think the old IE6 fixer still works to fix this in IE8: http://www.twinhelix.com/css/iepngfix/

UPDATE: Optionally, just disable the fade in IE and toggle from glowing/not-glowing immediately with no fade effect.

sunetos
Hmm, thought so. Have tried the twinhelix fix but doesnt seem to work any more with IE8 (Grrr!). Dont really want to remove the fade because the majority of my visitors are going to be using IE, and want to promote this kind of stuff quite a lot. Think to save hassle for now I will reformat the menu image as a JPG and work on the PNG fix another time... Sometime I really bloody hate IE!!!
Simon S
+1  A: 

Have you tried using the AlphaImageLoader Filter? It supports PNG transparency for IE 5.5+. This may let you keep the PNGs and not have to resort to JPGs.

I'm not exactly sure how your code is structured, but give this a try:

<!-- This DIV is the target container for the image.  -->
<div style="position:absolute; left:140px; height:400; width:400;
     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
     src='image.png', sizingMethod='scale');" >
</div>

For other IE developing solutions, keep this as a bookmark: http://msdn.microsoft.com/en-us/ie/default.aspx

Hristo
Will take a look at this. In the meantime have reformatted image and saved as JPG. Now works well (take a look at original link to see end results). Thanks for all the excellent help guys Si
Simon S
Looks good! So did you just use a conditional for IE to load JPGs?
Hristo
Nope, the same code runs for all browsers. Changing the PNG to a JPG and updating the CSS removed the IE problem and it now works fine in all browsers.Still hate IE though!!!
Simon S
Oh yeah... I totally agree. I have a project I'm working on that I have to find and fix all problems with the internal web pages at the company I work with so that everything works across browsers and OSs... all the internal pages were written specifically for IE6.
Hristo