How to set width of child menu to be at minimum as parent..

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
db
Advanced
Advanced
Posts: 15
Joined: Tue Feb 08, 2005 5:59 pm

How to set width of child menu to be at minimum as parent..

Post by db »

Is it possible to set the width of child menu to the width at least the same as the parent menu has?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

If you have specified a width of a parent, then you could set the child that width. If you are saying you want the child menu to read what the parent menu is and then take that width, I think that might take a function. There is a reference guide to some menu functions but I don't know if any of those would help. http://milonic.com/menu_methods.php

Ruth
db
Advanced
Advanced
Posts: 15
Joined: Tue Feb 08, 2005 5:59 pm

Post by db »

I had in mind to read the width of parent, and if the child is smaller at width, then set it to the same as parent.
I will try to play with it later on.
Thanks for reply.
HCBen
Beginner
Beginner
Posts: 9
Joined: Thu May 05, 2005 2:28 pm
Contact:

Post by HCBen »

Have you, or anyone, figured out how to do this? I thouht I'd ask before trying figure it out myself.

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

Post by Ruth »

Hi,

I don't know if anyone figured this out. I know you can set a minwidth of a menu, that's one of the properties, however, that wouldn't help unless you had some function that figured out the width of the parent item and then set the min width you wanted for the submenu that opened from it.

There is a post about finding the x coordinate. This had to do with positioning a submenu based on the main menu item when the main was in a frame and sub in another. I realize that's not what you want, however it talks about getting and setting positions and I believe it also has something about finding the width since you'd need that to set the position. I think....

viewtopic. ... 5479#15479

You are probably going to want to skim the answers by Andy and Kevin since they also talk about item references.

Maybe this will give you some ideas. The other option would be to set the width of each parent item, each item in the main horizontal menu, and then set it's corresponding vertical submenus to that as the minwidth.


Ruth
Post Reply