Horizontal text menu - can it wrap to next line?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Marc_J
Advanced
Advanced
Posts: 12
Joined: Mon Apr 04, 2005 12:29 pm

Horizontal text menu - can it wrap to next line?

Post by Marc_J »

My main menu is horizontal but rather long - is there any way to make, say, the first 5 items be on the top and then the next 5 on a line below?

e.g. instead of

Item 1 | Item 2 | Item 3 | Item 4 | Item 5 | Item 6 | Item 7 | Item 8 | Item 9 | Item 10

I want

Item 1 | Item 2 | Item 3 | Item 4 | Item 5
Item 6 | Item 7 | Item 8 | Item 9 | Item 10

If it is possible, could I fine tune the x position of the 2nd row, too?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

There is a menu property called divides. I have seen it used on vertical menus but not on horizontal menus, though I just tested it and it works in Netscape 6, 7, Opera 7.1, 7.54, Firefox [bird] .07, 1.0.2, and IE5.5

If you use this to have your menu wrap you cannot control the bottom position since this is still one menu. To use the divides in the main horizontal menu add divides=2; to the menu definition. i.e.
style=menuStyle;
top=10;
left=10;
orientation="horizontal";
divides=2;

If you want to control where the bottom 'line' sits, then I suggest you make two menus and sit one below the other using the menu's positioning, i.e. top=10;left=20; and the bottom menu would be top=the distance from the top plus the height of the first menu. So, if you're first menu is 20px high and set at top=10; the second would be top=30; You'll have to experiment to get the correct placement.

If you use the option of two menus, I highly recommend that you use an image based menu instead of text since if a person sets their text size to very large it will increase the height of the menu causing the top one to have part of it go behind the one below it.

Ruth
Post Reply