Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:06

?How-to right align vertical menus


Poster: cameron
Dated: Tuesday October 19 2004 - 22:11:17 BST

Hi,

I've got some fairly standard vertical menus but the web designer my client is using designed the menus so that they are all right-aligned.

That is, the box of the submenus appear right-aligned to the box of the primary menu. The default appears to be left-alignment.

There is some sort of global variable in menu_data.js called
_subOffsetLeft which would be useful but changing its value doesn't
appear to do anything and I can't find any documentation on it.

Thanks!

Cameron


Poster: Maz
Dated: Wednesday October 20 2004 - 0:16:45 BST

That's a bit complicated for me, but search the forum, for previous threads.

I'm confusing left and right, but probably what you are looking for is

openstyle="rtl";

maz


Poster: kevin3442
Dated: Wednesday October 20 2004 - 1:27:33 BST

Maz is right... placing openstyle="rtl"; in the definition for each submenu ought to do the trick (assuming I understand the goal). E.g.,
Code:
with(milonic=new menuname("MenuName")){
style=menuStyle;
openstyle="rtl";
aI("etc, etc, etc");
aI("etc, etc, etc");
}

Cheers,

Kevin


Poster: cameron
Dated: Wednesday October 20 2004 - 1:50:12 BST

Thanks!

Sadly, that didn't seem to work for me. The menus continue to be
left-aligned. Let me see if I can draw ASCII pix:

<pre>
Left-aligned:
+------------+
| menu1 |
+------------+
+------------------+
| submenu1 |
+------------------+

Right-aligned:
+------------+
| menu1 |
+------------+
+------------------+
| submenu1 |
+------------------+
</pre>

Cheers!

Cameron


Poster: Ruth
Dated: Wednesday October 20 2004 - 2:50:21 BST

Are you asking to know is it possible to have the right border of the main menu and the right border of the submenu be in alignment?

Ruth


Poster: cameron
Dated: Wednesday October 20 2004 - 2:51:29 BST

yup


Poster: Ruth
Dated: Thursday October 21 2004 - 3:41:08 BST

I think you can do that using top="offset= whatevernumber"; needed, and left="offset=whatevernumber"; You can use negative numbers here. You would use these positions in the submenus you want to position from the main menu item. This is only a suggestion because without seeing the page and where the menu is and the submenus are supposed to open there's no way to know if the anti-collision part of the program will be called into use or if something else will cause a problem with this. There is also a section on methods and functions. I know there are things to do with gpos, getting a position and spos, setting a position but I don't really know if they refer to anything you would need.

http://www.milonic.com/menu_methods.php

Ruth


Poster: cameron
Dated: Thursday October 21 2004 - 3:51:17 BST

ack! sorry! :( totally forgot to mention that I am using relative positioning (inside of a table td) so I can't use absolute positioning via top/left to move the submenus.

thanks for the suggestions, tho! :)


Poster: Maz
Dated: Thursday October 21 2004 - 10:10:20 BST

I think you can use the table padding, and maybe menualign="right";
then on submenus right="offset=*px"; top="offset=*px"; (*=number of pixels) The offset is from the main menu.

maz