Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:32
Firefox align problem
Poster: Atlas50
Dated: Tuesday September 20 2005 - 13:30:19 BST
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:
<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 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>
<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 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:
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;");
}
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
Poster: John
Dated: Tuesday September 20 2005 - 14:59:00 BST
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.
Poster: Ruth
Dated: Tuesday September 20 2005 - 16:28:35 BST
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:
.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