views:

1185

answers:

2

Im building a website with a jquery header that fades one picture into the next (as you have all seen before). Take a look at a sample page here:

http://hqinternetsolutions.com/fullservice/index.html

In IE6, the images shift way over to the right creating a margin. I figured out what is causing it. In the jquery.innerfade.js file, there is a line that says:

for (var i = 0; i < elements.length; i++) {
                $(elements[i]).css('z-index', String(elements.length-i)).**css('position', 'absolute').hide();**
            };

The Position:absolute is causing the image to appear incorrectly in ie6. When I change the absolute to relative or fixed, the image appears in teh right place, but the next image loads below it until the fade is complete and then it shifts up. I cant seem to get the innerfade to work properly in ie. Any ideas?

A: 

you can fix this with your CSS file only:

  • set the parent element as position: relative
  • set the image IMG tag as position:absolute; top:0;left:0;
pixeline
Thanks pixeline. I tried that without success. Am I doing this correctly?ul#header{ float:left; width:700px; list-style:none; margin:0; padding:0; height:223px; position:relative;}ul#header img{ position:absolute; top: 0; left: 0;}
JCHASE11
A: 

I am having the same issue. I was able to hack the code but now the images are cut in half durning transition:

http://rosodigital.com/gray/index.htm

Thats strange that your image is cut in half. My full image appears, but shifted over to the right. Let me know if you find a solution
JCHASE11
I found this to work for me. It resolved the offsetting issue but then I encountered the cutting halving issue likely a CSS issue that I am missing. http://paragasu.wordpress.com/2009/01/28/ie6ie7-min-height-bug-and-margin-bug-fixed/Also I ended axing that plugin and opting for something much more simple. http://jonraasch.com/blog/a-simple-jquery-slideshowhope that helps. I have been stuggling with this off and on for 3 weeks.
That is it! Setting a negative margin on the div's li fixes it!
JCHASE11