Centering in explorer

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
User avatar
yadin
Super Advanced
Super Advanced
Posts: 69
Joined: Sun May 19, 2002 8:23 pm
Location: State College, PA, USA
Contact:

Centering in explorer

Post by yadin »

Centering in explorer doesn't work in a cross browser fashion.

When you center things in explorer it acts like there was a vertical scrollbar even if there ain't any.
This was done to prevent recentering in case dynamic content makes a scrollbar appear.

Problem is that our beloved menu centers itself CORRECTLY, without the "fake scrollbar" trick.

This makes a correctly centered menu in explorer fail to align on other browsers(in my case Mozilla).

To correct the behaviour(or to break it the MS way ;-) ) just go to line 495 of mmenu.js, character 363 and change

ww=_d.body.clientWidth;

into

ww=_d.body.clientWidth-15;


Cya!
jj@bitmaster.it
Beginner
Beginner
Posts: 3
Joined: Sun May 19, 2002 7:52 pm

Re: Centering in explorer

Post by jj@bitmaster.it »

Ahum... to fix NS 4.79(dunno about other releases)...

line 496, char 424

change:

ww=self.innerWidth-16

to:

ww=self.innerWidth-12


I'm not totally sure this is the way to go for fixing EVERY centering problem, but my menu wasn't going to cooperate any way but this.

I'm gonna test this with Opera and Konqueror, then I'll let you know if everything is working correctly.
jj@bitmaster.it
Beginner
Beginner
Posts: 3
Joined: Sun May 19, 2002 7:52 pm

Re: Centering in explorer

Post by jj@bitmaster.it »

Seems like I got it right... it works in Opera, too. :-)
jj@bitmaster.it
Beginner
Beginner
Posts: 3
Joined: Sun May 19, 2002 7:52 pm

Re: Centering in explorer

Post by jj@bitmaster.it »

Last rant for the day :-)

This is the ultimate fix for explorer... (it wasn't going to be ok anymore when scrollbars showed up):

line 496 char 341:

ww=_d.body.clientWidth;wh=_d.body.clientHeight

becomes

ww=_d.body.clientWidth;wh=_d.body.clientHeight;if( _d.body.clientHeight>_d.body.scrollHeight) ww=ww-15

Adaptive modification... hope I won't need to fix next versions, too ;-)))

Cya!
Post Reply