Centering Text Inside of each Menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
JakeRi
Beginner
Beginner
Posts: 2
Joined: Tue Jul 18, 2006 5:07 pm
Contact:

Centering Text Inside of each Menu

Post by JakeRi »

When my webpage was resized by using the "wheel mouse and ctl key" inside of IE6, my menu would change widths. However I didn't want this because I wanted everyting to stay propotional to the other tables. So, I found the example of setting menuwidth="100%" and itemwidth="100%" to correct this problem. However,now all of the text in each menuitem isn't centered. They seem to be left justified. I wold like the words FAQ, Search,... to be centered inside each box. Any ideas? I attached my code below.

Thanks,
Jake




<!-- Menu -->
<TABLE cellSpacing=0 cellPadding=0 border=2 height="30" width=765>
<TBODY>
<TR bgColor=white width = 90%>
<TD align = center >
<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
orientation="horizontal";
alwaysvisible=1;
menuwidth="100%";
itemwidth="100%";
menualign="center";
top=215;
left=10;
position="relative";

aI("text=Home ;url=http://milonic.com/;");
aI("text=Adopt A ;url=http://milonic.com/;");
aI("text=About s ;url=http://milonic.com/;");
aI("showmenu=ChildInfo;text=ChildInformation;");
aI("text=FAQ;url=http://milonic.com/;");
aI("text=Search;url=http://milonic.com/;");
}
drawMenus();
</script>
</TD>
</tr>
</tbody>
</TABLE>
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Text alignment is done with the property align, so you'd set align="center"; to center text.

Ruth
JakeRi
Beginner
Beginner
Posts: 2
Joined: Tue Jul 18, 2006 5:07 pm
Contact:

Post by JakeRi »

Hey thanks!!


Jake
Post Reply