0

Same size width menuitem that width size menu parent

asked 2020-02-14 16:17:20 +0800

xnavarro gravatar image xnavarro
1

Hi everyone!!

I have a display problem with the menuitem. I'm trying to make the width of menuitem the same width size as that menu. it's possible?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-17 15:14:41 +0800

MDuchemin gravatar image MDuchemin
1561 1 5
ZK Team

Hi There,

Do you mean you want the menupopup to be the same width as the parent menu component?

The easy but meh way to do that would be to hardcode the width you want on menu and menupopup. But that's somewhat annoying, since you can't use dynamic size in this case.

More complicated, but more extensible: You can use a client-side listener to do something during "bind_" (the time when components are added to the page). You can check the width of the menu object and use that as value for menupopup's width.

Here's an example of both approach on ZKFiddle

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2020-02-14 16:17:20 +0800

Seen: 6 times

Last updated: Feb 17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More