oh.. and please note in your answer that i wanna make the website both suitable for most resolutions (800x600 and up) and also multi-lingual (meaning there are different menu contents in each language. some wider, some are less).[/quote]
Hi Ronnie,
Sorry for the delay.... been traveling.
ronnie wrote:regarding the menu positioning, it seemed like the most obvious to place the 2 menus (one horiz + one vert) each in a <TD> along with all the other stuff.
Certainly makes sense, but I think that most positioning requirements can best be handled without the need for tables.
please explain how i get the same result (postion:relative is good enough?) without table bound menus.
You don't need to set the
position property at all if you do what I have in mind. Try this... remove your curent menu code from the table cells and put it in your menu_data.asp file, along with your other menu definitions. Your two "main" menus will end up being defined something like this:
The Main Menu:
Code: Select all
with(milonic=new menuname("Main Menu")){
style=mainmenuStyle;
top=112;
screenposition="right";
alwaysvisible=1;
orientation="horizontal";
aI("text=ãó äáéú;url=javascript:milonic_click('home','False');status=áøåë/ä äáà/ä...;");
aI("text=îé àðçðå;showmenu=SubMenu0;url=javascript:milonic_click('showdata.asp?id=1&language=he','False');status=àîðú ôøåôéì çãù;");
aI("text=çãùåú åôòéìåéåú;url=javascript:milonic_click('showdata.asp?topic=c&navbar=1','False');status=çãùåú åòéãëåðéí;");
aI("text=çéðåê;url=javascript:milonic_click('showdata.asp?topic=d&navbar=1','False');status=ìåç ôòéìåéåú åàéøåòéí;");
aI("text=ñéøåá åäéîðòåú;showmenu=SubMenu1;url=javascript:milonic_click('showdata.asp?topic=e&navbar=1','False');status=ñøáðé/åú îöôåï;");
aI("text=îéãò;url=javascript:milonic_click('showdata.asp?topic=f&navbar=1','False');status=îàîøéí åäøöàåú;");}
Note the use of the
top and
screenposition properties to position the menu (adjust
top as needed). Note also that the
position property has been removed because it is not needed in this application. If you want to bump the menu away from the right edge of the window a little bit, you could also throw in
left="offset=-5"; or however many pixels you'd like to adjust it. I have also not included
openstyle="rtl";. I find it interesting that, even though you include it in your menu code, it doesn't seem to take effect (e.g., the
subimage in your menu items is sill on the right, when openstyle="rtl"; should move it to the left. I think this might be because your use of openstyle="rtl"; in the menu and DIR="RTL" in the <body> have cancelled each other out (just a hunch). Anyway, you could put openstyle="rtl"; back in, but that would move the subimage to the left side of the menu items, which is not where they currnetly are in your test page. Try it both ways and see which one you like better.
The Vertical Menu:
Code: Select all
with(milonic=new menuname("Vertical Menu")){
style=verticalmenuStyle;
top=112;
alwaysvisible=1;
menuwidth=80;
aI("text=Language <img src="images/earth.ico">;showmenu=VerticalSubMenu0;status=áçéøú ùôä;");
aI("text=ùì îé äáéèçåï äæä?;url=javascript:milonic_click('showdata.asp?id=2&language=he','False');status=?ùì îé äáéèçåï äæä;");
aI("text=öøå ÷ùø;url=javascript:milonic_click('contactform.asp','False');status=öøå ÷ùø;");
aI("text=÷éùåøéí;showmenu=LinksMenu;status=àúøéí áøùú;");
aI("text=ôåøåí;url=javascript:milonic_click('http://www.speedy.co.il/cgi-bin/forums/index.cgi?board=newprofile','True');status=äôåøåí ùì ôøåôéì;");}
Changes include: Use of
top to position the menu (no need to set left, because it will be 0 by default -- unless you want to move it off the left edge a bit). Removal of
position (not needed now). Removal of
orientation (vertical is the default, so not needed). Again, I find it iteresting that you used openstyle="ltr"; (the default by the way)... so, the
subimage should be on the right side, but it's actually on the left... again, because of a reversal caused by DIR="RTL" in the <body>??? Experiment with this setting to see which you prefer.
Last comment: you should use semicolons after the last property setting (before the closing double quote) of each aI() menu item definition. You are leaving them out after
status="xxxxxxx" ... should be
status="xxxxxx";
Hope that helps,
Kevin