Netscape alignment issue - 1px offline

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Davidk
Super Advanced
Super Advanced
Posts: 48
Joined: Tue Sep 23, 2003 11:10 am

Netscape alignment issue - 1px offline

Post by Davidk »

Hi!

A couple of months ago I posted a probelm relating to my menu at the then "beta-version" of my Website. The Website has now been online for quite a while at http://www.rwi.lu.se and I today (25 May) updated to the latest version of the menu. However, the problem is still there.

It only occurs in Netscape and only with a few pages, namely that the menu jumps one px to the left of the main table. No matter how strange is might sound, it seems that the "longer" the pages are, or more correctly, if the page is "long" enough, the problem does not occur. However, it still occurs in the short pages. Compare for instance:

http://www.rwi.lu.se/institute/work.shtml - where is does occur, with http://www.rwi.lu.se/index.shtml - where is does not occur.

I got a lot of help in my last thread (http://milonic.com/forum/viewtopic. ... highlight=), where amonst other things, Kevin provided me with an "adjustor". However, while the adjostor adjusts every time, the page seems to recenter only when the shorter pages appear.

Please help me with this, or is in fact so that this problem is beyond help?

Thanks in advance,

David

P.S. Sorry for coming back with this old issue.
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

This has now been fixed and should appear in version 5.21 due out soon.

You'll need to adjust Kevins custom function, or maybe remove it altogether.

Cheers
Andy
Davidk
Super Advanced
Super Advanced
Posts: 48
Joined: Tue Sep 23, 2003 11:10 am

Post by Davidk »

Thanks alot! Excellent. I should probably just remove Kevins adjustor then. I will keep my eyes open for the new version.

You guy's at Milonic rocks!

D
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Man. I feel totally abused. :cry:
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Heh, get in line, bubba :!: :lol:
John
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Oh I'm sorry Kevin, didn't mean to upset you or your code :P

Where did that code come from anyway, what's it for?

-- Andy
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Andy wrote:Oh I'm sorry Kevin, didn't mean to upset you or your code :P
Yeah... sure [sob]. You're just a big brute... ;) Actually, I was just kidding (which I'm sure you knew).
Where did that code come from anyway, what's it for?
I whipped it up in February, when David first brought the phenomenon to lght. You can see it in this thread. It was meant to bump the menu over, onresize and onload, to sort of re-center it if its own initial centering was off a bit compared to other centered conent in some browsers (in this case by 1px in NS7). But I actually intended it as a temporary measure, for David and anyone else experiencing the same sort of thing. You'll notice in that thread, that in my reply prior to the one where I posted the code, I mentioned that
kevin3442 wrote:I don't know if the behavior you see in NS7 results from the way NS7 centers things inherently, or if its the way the menu centers itself in NS7. Either way, Andy should be able to code around it pretty easily in the menu code (i.e, if it's NS7 and the available width is odd, subtract 1px from the left coordinate of the centered menu). Of course, that's easy for me to sit here and say, because I'm not the one who would have to make the change!

Meantime, I suppose there are some coding workarounds available to you. For example, you could implement an onresize event handler that sniffs the browser and if it's NS7 and the width is odd, then resize the window yourself to make it 1px narrower. Or, onresize if it's NS7 and the available width is odd (the window width is even), then reset the menu's position by 1px to the left. You could also call the same function onload, so that the adjustment is made if necessary when the page first loads.
So, I'm not really feeling abused. It's good if the menu can take care of this inernally... which I guess is now the case!

Cheers,

Kevin
Post Reply