Setting the Menu Width to fit a Cell

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
MakoHaze
Beginner
Beginner
Posts: 1
Joined: Wed Sep 13, 2006 9:23 am

Setting the Menu Width to fit a Cell

Post by MakoHaze »

Alright, I have a very exact look I'm striving for here. The cell is 750 pixels wide, I have the menu offset 2pixels from the left to show the left colored line of the background, and I want the menu to be exactly 746 pixels wide (allowing for those two pixels to be left on the other side as well).

Here is a sample of the page I'm working with:

http://www.gorilla-studio.com/files/test/

I've tried setting menuwidth to 746 (with and without the "") and I've tried setting it to 100% and I'm just not sure what to do. I want the menu to take up that exact space, leaving those two pixels on either side.

In addition, I want each menu item along the top to be equally spaced once I figure out how to set the menuwidth to what I'm trying to do.

Also, I'm not sure how to change that MILONIC link on the first panel of the menu.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Use itemwidth = 746; in your Main Menu style (dump the menuwidth).

As to the MILONIC link, it will go away automatically when you purchase your license for this site.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Well, I tried this and it worked.

Code: Select all

<TR>
    <TD vAlign=top align=left width=750 
    background=breadcrumb-bkg.gif height=25 class="menutd">
	<center><table width=746 cellpadding=0 cellspacing=0 align="center">
<tr>
    <td> <SCRIPT>
		with(milonic=new menuname("Main Menu")){
		style=menuStyle;
		alwaysvisible=1;
		left=2
		menuwidth="100%";
		itemwidth="100%";
		orientation="horizontal";
		position="relative";
		aI("text=BaseVacDental.com;url=http://www.basevacdental.com/;");
		aI("text=History&nbsp;of&nbsp;BaseVac;showmenu=History of BaseVac;");
		aI("text=BaseVac&nbsp;Advantages;showmenu=BaseVac Advantages;");
		aI("text=BaseVac&nbsp;Models;showmenu=BaseVac Models;");
		aI("text=Technical&nbsp;Documents;showmenu=Technical Documents;");
		}
		drawMenus();
		</SCRIPT></td>
</tr>
</table></center>
     
    </TD></TR>
The css class:

Code: Select all

<style>
.menutd{padding-top:0px;padding-right:2px;padding-bottom:0px;padding-left:2px}
</style>
You'll note that I put another table, 1 cell, inside that td where you had the menu and I centered the table.

Ruth
Post Reply