View Full Version : AnyLink Menu Centering on MSIE

02-23-2006, 03:05 AM
Script: Anylink CSS Menu
url: http://www.dynamicdrive.com/dynamicindex1/anylinkcss.htm
mysite: http://www.fromtheduke.com/oloa/
Testing at here too: http://www.fromtheduke.com/oloa/anylink.php

I'd appreciate any help y'all can give me this is driving me crazy.

The links in the menu bar look fine on the Mac and in Firefox, but in IE. The dropdown menu actually centers below the toolbar. I can't understand why it's doing this and it's driving me insane.

I have one text-align: center and that in #header and nowhere else. I tried using the anylink CSS exactly as the example and that didn't help. I tried creating the test page with only the anylink code and it worked fine (as it does on the dymamicdrive.com site too.) I tried including my style sheet in the test page, as you can see, and it still works fine. I also made "anchor link 1" use 'navbar'; my definition and it also is working fine in the test.

I don't know if it has anything to do with "mybox" or "#ourlady" causing it to tab over even though the z-index is set to higher than those. I can't seem to make out what the problem is.

02-23-2006, 03:43 AM
I have been able to determine something. I'm not sure why but in MSIE. The first element in the function getposOffset() the line says:
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
When returning offsetLeft it is returning the value 190, which is the offset from the beginning of the #page element. Instead on firefox and IE, it's returning properly 10, which is the offset within the <li> element itself.

So, what happens then is it is returning too many values since when it goes up to UL it also returns 190, then it returns other values to get to the left which end up returning 506 instead of the necessary 332.

I don't know how to fix this but I know that this is the problem.

02-23-2006, 03:55 AM
My apologies, I found this thread which has helped me create a work-around.