uniform spacing in table

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
bdaltilio
Advanced
Advanced
Posts: 15
Joined: Mon Oct 03, 2005 4:37 pm

uniform spacing in table

Post by bdaltilio »

I have a menu in a table that will be different widths based on the industry selected. Is there some way to have the table fill up the entire table cell so the menu items are evenly spaced based a dynamic selection. See my menu code below:

Code: Select all

<table align="center" bgcolor="#890027" width="770" cellpadding="3" cellspacing="0" border="0">
<tr bgcolor="#DEC282">
<td class="menu" valign="middle">
<script language=JavaScript type=text/javascript>
with(milonic=new menuname("Main Menu")){
style=menuStyleTop;
alwaysvisible=1;
orientation="horizontal";
menuwidth="100%";
menualign="center"; 
position="relative";
align="center";
aI("text=About Us;showmenu=aboutus;");
<%IF Session("Industry") = 2 THEN%>
aI("text=What's New;showmenu=whatsnew;");
<%END IF%>
aI("text=Products;showmenu=products;");
aI("text=Specifications;showmenu=specs;");
aI("text=Literature;showmenu=literature;");
aI("text=MSDS;url=/msdstds/search.asp;");
aI("text=Contact Us;showmenu=contact;");
}
drawMenus()
</script>
</td>
</tr>
</table>
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

The only way I know to do that is to use percentages in the itemwidths. All the percentages must equal 100%. So, you'd have to have the items that change the same %. There is one problem and I've reported it. The align= property seems to not work in menuwidth=100% when itemwidth=% is used. So, the items align left, though that may not be a problem since the items are spread out over the 100% span.

Ruth
Post Reply