Firefox align problem

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Atlas50
Beginner
Beginner
Posts: 2
Joined: Tue Sep 20, 2005 1:06 pm

Firefox align problem

Post by Atlas50 »

I have put the menu into a cell. Everything works great in IE6, but in Firefox the menu items are not align center whatever I do.

The Website: http://www.xs4all.nl/~rjbrehm/northpole/

The HTML:

Code: Select all

<tr bgcolor="#000000">
<td bgcolor="#000000" width="100%" height="23" colspan="2"><script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
menuwidth="100%"; 
menualign="center"; 
alwaysvisible=1;
orientation="horizontal";
position="relative";
margin="0"; 
align="center"; 
aI("text=Over&nbsp;Mij;showmenu=aboutme;itemwidth=20%;");
aI("text=Leeg;showmenu=Milonic;itemwidth=20%;");
aI("text=Leeg;showmenu=Partners;itemwidth=20%;");
aI("text=Leeg;showmenu=My Milonic;itemwidth=20%;");
aI("text=Links;showmenu=Links;itemwidth=20%;");
}
drawMenus();
</script>
</td>
</tr>
The menu_data.js:

Code: Select all

with(menuStyle=new mm_style()){
bordercolor="#000000";
borderstyle="solid";
borderwidth=0;
align='center';
fontfamily="Verdana";
fontsize="75%";
fontstyle="normal";
fontweight='bold';
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#000000";
offcolor="#ffffff";
onbgcolor="#ED8C01";
oncolor="#000000";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=100);Shadow(color=#777777', Direction=135, Strength=5)";
padding=5;
separatorcolor="#2D729D";
separatorsize=1;
subimage="arrow2.gif";
onsubimage="arrow.gif";
subimagepadding=2;
}

with(milonic=new menuname("aboutme")){
style=menuStyle;
aI("text=Hier komt tekst te staan!;url=index.html;");
aI("text=Hier komt tekst te staan!;url=index.html;");
aI("text=Hier komt tekst te staan!;url=index.html;");
aI("text=Hier komt tekst te staan!;url=index.html;");
}
I guess it is easy problem, but I have tried for hours now, hopefully somebody can help, thanks in advance :)
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Just looked at your page under XP Pro/FF1.0.6 and everything looks centered to me, including the sub-menu. You should update your menu code, however. v5.731 is current, you're running 5.729. A number of bugs have been fixed.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

It has to do with the menuwidth=100% and itemwidth=20% in combination. For whatever reason, once you have done that neither IE5.5, nor FF will let you align the text center. You can fix it either by changing to itemwidth=140px; which will work since you have a fixed width table, or by creating a class and indenting the text.

Code: Select all

.mindent{text-indent:20px}
Then in each of the main horizontal menu items you'd put onclass=mindent;offclass=mindent; You can play around with how much you want it to indent.

Ruth
Atlas50
Beginner
Beginner
Posts: 2
Joined: Tue Sep 20, 2005 1:06 pm

Post by Atlas50 »

Thanks a lot John and Ruth. I have changed everything to px instead of % and that fixed the Firefox problem.
Post Reply