Hello
My menu is here: http://www.brucedalbrack.com I would like #FFFFFF separators/borders on the main menu but #888888 seperators/borders on the sub menus.
My apologies for the elementary nature of the question as I'm a bit thick looike viz HTML. Thanks in advance
Bruce
Differentiating separator/border colours in main/sub menus
-
- Beginner
- Posts: 3
- Joined: Wed Nov 23, 2005 9:45 am
Hi,
The easiest way is to make another style for the submenus. If the style is the same as the menuStyle except for separator colors then the best method is to use copyOf.
Place that below the menuStyle after the closing } and before the
For more information:
1. you need to put the calls for the menu files the first thing after the body tag before anything else
2. you need to put the menu in the table using the correct method. You cannot just place the menu_data.js file there and have it work correctly on all browsers.
Table example
It's longer for me to try and write here how to do it, than if you take a look at the above link.
Ruth
The easiest way is to make another style for the submenus. If the style is the same as the menuStyle except for separator colors then the best method is to use copyOf.
Code: Select all
subStyle=new copyOf(menuStyle);
subStyle.separatorcolor="#888888 ";
subStyle.bordercolor="#888888";
Code: Select all
with(milonic=new menuname("Main Menu")){
1. you need to put the calls for the menu files the first thing after the body tag before anything else
Code: Select all
<body><SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>
Table example
It's longer for me to try and write here how to do it, than if you take a look at the above link.
Ruth
Last edited by Ruth on Fri Dec 23, 2005 2:50 am, edited 1 time in total.
Many thanks Ruth. This technique also comes in handy when you need a wide spacing on main horizontal menu, but don't want the vertical submenu items separated likewise.
Code: Select all
subStyle=new copyOf(menuStyle);
subStyle.separatorsize="1";
subStyle.separatorpadding="1";