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!
Centering in explorer
-
- Beginner
- Posts: 3
- Joined: Sun May 19, 2002 7:52 pm
Re: Centering in explorer
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.
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.
-
- Beginner
- Posts: 3
- Joined: Sun May 19, 2002 7:52 pm
Re: Centering in explorer
Seems like I got it right... it works in Opera, too.
-
- Beginner
- Posts: 3
- Joined: Sun May 19, 2002 7:52 pm
Re: Centering in explorer
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!
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!