?How-to right align vertical menus

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
cameron
Beginner
Beginner
Posts: 4
Joined: Tue Oct 19, 2004 10:06 pm

?How-to right align vertical menus

Post by cameron »

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
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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: Select all

with(milonic=new menuname("MenuName")){
style=menuStyle;
openstyle="rtl";
aI("etc, etc, etc");
aI("etc, etc, etc");
}
Cheers,

Kevin
cameron
Beginner
Beginner
Posts: 4
Joined: Tue Oct 19, 2004 10:06 pm

Post by cameron »

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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
cameron
Beginner
Beginner
Posts: 4
Joined: Tue Oct 19, 2004 10:06 pm

Post by cameron »

yup
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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://milonic.com/menu_methods.php

Ruth
cameron
Beginner
Beginner
Posts: 4
Joined: Tue Oct 19, 2004 10:06 pm

Post by cameron »

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! :)
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

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
Post Reply