"Itemwidth" variable still broken in RC15

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Marc-Andre.Roberge@mus.ul
Super Advanced
Super Advanced
Posts: 47
Joined: Sun May 19, 2002 7:23 pm
Location: Québec, QC, Canada
Contact:

"Itemwidth" variable still broken in RC15

Post by Marc-Andre.Roberge@mus.ul »

I apologize for coming back again on this topic, but the trick consisting in adding "itemwidth=100%" inside a supplementary (empty) main menu item to cause the menu bar to extend to the right of the screen, which stopped working after RC11 or maybe RC10, still gives no result; the menu bar stops at the end of the last real menu entry.

Code: Select all

aI("text=;itemwidth=100%;onbgcolor=#cc9933;offbgcolor=#cc9933;oncursor=default");
On 1 October jgillett <http://www.milonic.co.uk/forum/viewtopi ... d8ae174412> said that this bug was one of two items left to fix before going final. I sincerely hope that the final release will really fix it. Not being a graphics deisgner, I would really prefer not having to change the entire design of my site just to have a workaround or to be forced to revert forever to RC9. Thanks very much in advance.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

As Andy mentioned in another post, most (if not all) the changes so far in RC15 were for NS display problems. itemwidth was promised for final release (just to be picky).

Be patient - he's really bustin' butt over there to get everything done right.
John
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

itemwidth and 100% width are 2 separate issues.

Itemwidth does appear to be working as expected and is only for specifying the width of a single menu item.

100% width is now based on a 100% width table with the menu embeded inside, as a relative object.

A sample of this will be completed as soon as we can

-- Andy
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

A couple of comments if I may:

(1) It's late, so maybe I missed it, but I didn't catch a particular browser you are concerned about? is there one? I ask because I notice that the "trick" you mention does work in RC15 with IE6, NS7, and Opera 7 in Win2k (haven't taken the time to go any further).

(2) That trick will not work in some browsers (e.g., Opera 7) if you simply use text=; ... you should put a nonbreaking space in, like this: text=&nbsp;;

(3) Unfortunately, we all run a risk any time we rely on a "trick" of code to force a system to do something it wasn't designed to do. As Andy mentioned, itemwidth is meant specifically for items. If it can be used for some other purpose, that's great, but it shouldn't necessarily be relied upon. If that method seems to be failing, then perhaps there are other ways to achieve the effect you want. Having looked briefly at your site, I can think of one possible solution right away that might work well. At the position where you want your menu, create a table with one cell set to 100% width, left aligned, with the same background color as your menu. Get rid of the 100% menu item, and place your main menu in the table cell (leaving the rest in your .js file). Seems to me that ought to give you the effect you're looking for.

Hope that helps,

Kevin
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Hi Keven,

That's about it, my dummy browser says 100% of 1 space is 1 space.
The table underneath is 100% and menu right.

Regards
maz
Marc-Andre.Roberge@mus.ul
Super Advanced
Super Advanced
Posts: 47
Joined: Sun May 19, 2002 7:23 pm
Location: Québec, QC, Canada
Contact:

Post by Marc-Andre.Roberge@mus.ul »

To my greatest shame, I must admit that the changes to my files that were required by the disappearance some time ago of the "scriptpath" variable contained mistakes (i.e., one top directory level missing in the relative references to the location of the scripts). This meant that, even though I was using the most recent versions of the menu, my pages were looking in another directory for the scripts. I apologize for having raised the issue of the "itemwidth=100%" variable with such persistence. Using the following line as the last main menu item actually does what I am looking for, namely, extend the menu bar to the right edge of the screen:

Code: Select all

aI("text=;itemwidth=100%;onbgcolor=#cc9933;offbgcolor=#cc9933;oncursor=default");
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Not to worry. Everybody is entitled to a burp (or more, in my case!). You learned, you got it working, and you also took the time to post so others could learn. Can't ask any more... :D

Thanks.
John
Post Reply