Fixed widths for menubar items

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
screenmates
Advanced
Advanced
Posts: 26
Joined: Tue Jan 23, 2007 3:35 pm

Fixed widths for menubar items

Post by screenmates »

I'm trying to set fixed width to the menubar items as under:

Home -> 50px
Application -> 150px
Preferences -> 150px
Help -> 50px

There are more menubar items with 150px in between but the above is just an example. In the above, the Home and Help menubar items do NOT have submenus and so I want to set their width to 50px while all other menubar items have submenus and will be 150px. The intention is to achieve FIXED widths of 50px and 150px and not variable widths based on the length of the text. I figured out ItemWidth for the Home item is meant for all the menubar items while ItemWidth for other menubar items is actually meant for the width of their submenus and not those menubar items themselves. However, setting 0 to the Home's itemwidth is resulting in variable widths of all menubar items.

How do I go about setting two fixed widths (50px and 150px) as above?

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

Post by Ruth »

Hi,

There are 3 pages which contain lists of the particular things you can code in either the style section, the menu section or the item section of the menu_data file.

Those in the style section would apply the property to all items in all menus that use that style.

Those int the menu section will only work when placed in the menu, i.e. in the area where you have top=;left=;style= and so on, for example, margin is a menu property.

Those in the items will apply only to the item in which they are coded. Some properties can be coded in all three areas, some in two, and some only in the one specified for it. For example, something alwaysvisible is a menu property, not something you can code in the style or item.

Below my name are links to those pages, the properties are alphabetized. In the case of itemwidth, that can be a style, menu or item property. So, if you want each item to have its own width you code it in the item.

On the main site, under the DHTML Menu link, you'll see a Menu Quick Reference Guides. That has those three links but it also has links to pages about methods and functions, global properties like Boolean horizontalMenuDelay and also to global variables.

Hope this helps

Ruth
Post Reply