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:27

SubMenu Positioning - Right alignment


Poster: uri
Dated: Wednesday May 26 2004 - 0:25:35 BST

I am trying to align SubMenu items to the right of the MainMenu item instead of the default left, but with no success! (I tried to add menualign="right"; property to the SubMenus).

I am using "Menus built from images" sample (http://www.milonic.com/menusample18.php).

Thanks in advanced,
URI


Poster: fredlongworthhighschool
Dated: Wednesday May 26 2004 - 14:42:36 BST

I tried this, which worked ok for me:

Code:
aI("text=Staff Area;url=staff_area/page.html;align=right");


Poster: John
Dated: Wednesday May 26 2004 - 14:43:20 BST

Confusing. You say "SubMenu items" to the right. Does that mean individual items within a submenu (e.g., align text right), or the entire submenu itself?

URL (as requested)?

Re: SubMenu Positioning - Right alignment


Poster: kevin3442
Dated: Wednesday May 26 2004 - 16:12:25 BST

Hi Uri,

uri wrote:
...I tried to add menualign="right"; property to the SubMenus....

menualign works to align all of the menu items as a whole inside of a long, horisontal menu bar (i.e., to center the active part of a horizontal menu that has menuwidth=100%). So it's not the right property.

fredlongworthhighschool wrote:
I tried this, which worked ok for me:
Code:
aI("text=Staff Area;url=staff_area/page.html;align=right");

Yes, that works. But it'll only work for text, not for images (and Uri is using an image-based menu). The align property only works on text.

If you want to right-align images within menu items, then use the imagealign property, either in the menu style or in the menu items themselves.

But, as John says, we don't know if that's your goal, or if you want to align the position of the submenu in relation to its parent item.

Kevin


Poster: uri
Dated: Wednesday May 26 2004 - 19:18:37 BST

I meant aligning the entire submenu to the right of its parent item, not the text or image of an item.

Thanks a lot for your help...
URI


Poster: Maz
Dated: Wednesday May 26 2004 - 19:24:12 BST

That's more complicated:

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


maz


Poster: kevin3442
Dated: Wednesday May 26 2004 - 21:24:44 BST

uri wrote:
I meant aligning the entire submenu to the right of its parent item, not the text or image of an item.


Hi Uri,

You can do that with the openstyle property, setting it to "rtl". This is a menu property, so it is applied in each menu you want to affect (in this case, the submenus that branch off of yor main menu). So, for example, if you have a submenu named "Products" which opens from a main menu item, you would use the openstyle property in the "Products" menu definition, like so:
Code:
with(milonic=new menuname("Products")){
style=menuStyle;
openstyle="rtl";
aI("text=Product1;url=product1.htm;");
aI("text=Other Stuff;showmenu=otherstuff;");
}

Now the "Products" submenu will right-align with the parent item in the main menu.

A side effect of using openstyle="rtl" in this way is that the subimage used to indicate the availablility of a third-level submenu from a second-level submenu will be on the left side of the menu item instead of on the default right side. You can counteract this effect (if you want to) by specifying
Code:
subimageposition="right";
in the menu style that is used for your submenus.

Hope that made sense.

Kevin


Poster: uri
Dated: Wednesday May 26 2004 - 21:29:41 BST

thanks a lot Kevin, it works!!! stupid me for not finding it in the properties reference.

URI


Poster: kevin3442
Dated: Wednesday May 26 2004 - 21:39:33 BST

uri wrote:
thanks a lot Kevin, it works!!!

You're welcome. Happy to help.

uri wrote:
stupid me for not finding it in the properties reference.

There are a sh... ummm... lots of properties, and this one is among the less-used ones. So don't feel bad about not seeing it.

Cheers,

Kevin


Poster: Maz
Dated: Wednesday May 26 2004 - 21:43:04 BST

Why am I feeling particularly useless lately, I didn't think that would work off a horizontal menu. :|

maz