make width of menu longer

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Jay1395
Advanced
Advanced
Posts: 10
Joined: Wed Jan 11, 2006 8:39 pm

make width of menu longer

Post by Jay1395 »

Hi-
I am having a problem figuring out how to make the menu width longer. I have the menu in a table cell but I want it to have some blank space for the look of the site. The menu is at: http://vems.org/training.html what I want the menu width to look like or take up is:
http://www.vems.org/
let me know if u can help, I have found this as a great reference before
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Hi

Post by Migru »

Your menu is correct embedded in a table,

but, I think the page with the menu has a design problem.
The menu is placed in the center part of three columns.
When I am combining these columns to one only, and when I insert into the main menu code menuwidth="100%"; then the menu is as wide as these three columns together. If you want that there should be a padding to the table parts, ok, specify the padding in that TD or whatever it is, where you have the menu.

Michael

PS: If you have problems: I have downloaded your page, took it into my editor and was able to analyze the layout. Unfortunately by this downloading all necessary files for an immediate view are stored by my editor-system into a directory and all relevant paths set in this page are modified accordingly. If you want I can send you the layout code(*), for that you should send me your email address. ((*) so you could replace again the paths with the original settings)
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

may I forward a question ?
What editor do you have in operation ?

My editor reports some errors. Of course, this depends on certain issues, e.g. if it is really -//W3C//DTD HTML 4.0 Transitional//EN
or something else.


Michael
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

Jay,

My repsonse is a bit out of the scope of this forum, because it does get into a little design, but here it goes:

I don't think you can just "plug & play" your menu into the old site design. I can make it work, but your site will benefit from a slight redesign. To make the menu work, I have removed the <th> tag and replaced it with <td colspan="3">. This replaces the table header (I'm not sure why it's there) and replaces the three <td>'s with one large cell. Then, I added menuwidth="100%"; to the main menu style. This got the menu to span the entire width of the cell. Here's the code:

Code: Select all

<table width="100%" height="100%" border="0"> 
         <tr> 
            <td colspan="3" height="244"> 
            <script type="text/javascript"> 
with(milonic=new menuname("Main Menu")){ 
style=menuStyle;
menuwidth="100%"; 
alwaysvisible=1; 
position="relative"; 
orientation="vertical"; 
aI("status=Back To Home Page;text=Home;url=http://www.vems.org/;"); 
aI("showmenu=Our Service;text=Our Service;"); 
aI("showmenu=Alumni;text=Alumni;"); 
aI("showmenu=Services;text=Services;"); 
aI("status=Pictures;text=Pictures;url=http://www.vems.org/pictures.html;") 
aI("showmenu=Training;text=Training;"); 
} 

drawMenus(); 
</script></td> 
          	</tr> 
            </table>
However, there are other things as well. You have an empty table above the table that houses the menu. I'm not sure why the empty table is there, but I guess it's just a hold-over from the previous design.

Code: Select all

<table width="100%" height="100%" border="0">
			<tr>
			</tr>
		</table>
You can get rid of this whole empty table and just have one large table that houses the menu. That would also get rid of <td colspan="3"> and make it one table with one large cell. So this...

Code: Select all

<table width="100%" height="100%" border="0">
			<tr>
			</tr>
		</table>
		<table width="100%" height="100%" border="0">
			<tr>
				<td colspan="3" height="244">
				<script type="text/javascript"> 
with(milonic=new menuname("Main Menu")){ 
style=menuStyle;
menuwidth="100%";
subimageposition="left"; 
alwaysvisible=1; 
position="relative"; 
orientation="vertical"; 
aI("status=Back To Home Page;text=Home;url=http://www.vems.org/;"); 
aI("showmenu=Our Service;text=Our Service;"); 
aI("showmenu=Alumni;text=Alumni;"); 
aI("showmenu=Services;text=Services;"); 
aI("status=Pictures;text=Pictures;url=http://www.vems.org/pictures.html;") 
aI("showmenu=Training;text=Training;"); 
} 

drawMenus(); 
</script>
				</td>
			</tr>
		</table>
...would be reduced to this:

Code: Select all

<table width="100%" height="100%" border="0">
			<tr>
				<td>
				<script type="text/javascript"> 
with(milonic=new menuname("Main Menu")){ 
style=menuStyle;
menuwidth="100%";
subimageposition="left"; 
alwaysvisible=1; 
position="relative"; 
orientation="vertical"; 
aI("status=Back To Home Page;text=Home;url=http://www.vems.org/;"); 
aI("showmenu=Our Service;text=Our Service;"); 
aI("showmenu=Alumni;text=Alumni;"); 
aI("showmenu=Services;text=Services;"); 
aI("status=Pictures;text=Pictures;url=http://www.vems.org/pictures.html;") 
aI("showmenu=Training;text=Training;"); 
} 

drawMenus(); 
</script>
				</td>
			</tr>
		</table>
Hope this helps.

Viken K.
Jay1395
Advanced
Advanced
Posts: 10
Joined: Wed Jan 11, 2006 8:39 pm

Post by Jay1395 »

Yet again success from this forum, thanks so much everyone, and just so you know I use Dreamweaver 8, I think someone asked.
Post Reply