SubMenu Positioning - Right alignment
SubMenu Positioning - Right alignment
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://milonic.com/menusample18.php).
Thanks in advanced,
URI
I am using "Menus built from images" sample (http://milonic.com/menusample18.php).
Thanks in advanced,
URI
- fredlongworthhighschool
- Mega Advanced
- Posts: 362
- Joined: Fri Jun 27, 2003 11:34 am
- Location: Manchester, England.
- Contact:
I tried this, which worked ok for me:
Code: Select all
aI("text=Staff Area;url=staff_area/page.html;align=right");
Andy Davis
Web Designer & Smartboard Manager
Fred Longworth High School, Manchester, England.
Web Designer & Smartboard Manager
Fred Longworth High School, Manchester, England.
Re: SubMenu Positioning - Right alignment
Hi Uri,
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
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.uri wrote:...I tried to add menualign="right"; property to the SubMenus....
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.fredlongworthhighschool wrote:I tried this, which worked ok for me:Code: Select all
aI("text=Staff Area;url=staff_area/page.html;align=right");
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
Hi Uri,uri wrote:I meant aligning the entire submenu to the right of its parent item, not the text or image of an item.
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: Select all
with(milonic=new menuname("Products")){
style=menuStyle;
openstyle="rtl";
aI("text=Product1;url=product1.htm;");
aI("text=Other Stuff;showmenu=otherstuff;");
}
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: Select all
subimageposition="right";
Hope that made sense.
Kevin