Page 1 of 1

{NAV_HORIZ_DD:ID,Level depth} Looking for compact top level

Posted: Fri 18. Sep 2009, 02:46
by StudioZ
With this great menu solution:
http://www.phpwcms-howto.de/wiki/doku.p ... v_horiz_dd
{NAV_HORIZ_DD:ID,Level depth}

I am looking for the tweak to make this great Dropdown/Flyout menu with no fixed width, thus, for a more compact top level menu.

Problem:
Check: http://www.iroutier.com/site/accueil.phtml
Not much space left in my case to add more than 1 or 2 other main categories

I'd wish there would be no fixed width, at least for the main menu level (before hovering).
For the hidden subcategories, then simply inheriting the largest value inherited by the titles of the current subcategories

Will be back in some hours... have to hit the road... :wink:
Will have plenty of time to think... :wink:

Cheers,

Yves

Re: {NAV_HORIZ_DD:ID,Level depth} Looking for compact top level

Posted: Fri 18. Sep 2009, 09:41
by flip-flop
Hi Yves,

fast solution:

First level width:

Code: Select all

    #pmenu a, #pmenu a:visited {
       display: block;
/*       width: 120px; */       /* -kh */
       padding: 0 10px 0 10px;  /* +kh padding only first level */
       float: left;             /* +kh */
Sublevel width:

Code: Select all

    #pmenu li ul li a, #pmenu li ul li a:visited {
       border-width: 0 1px 1px 1px;
       width: 152px;          /* +kh width for all sub level */
       padding: 0 5px 0 5px;  /* +kh padding for all sub level */
I hope it work correctly.

Knut

Re: {NAV_HORIZ_DD:ID,Level depth} Looking for compact top level

Posted: Fri 18. Sep 2009, 17:04
by StudioZ
Oh Knut :shock: :D :wink:
Thank you!!! Your tweak did the job perrrrfecccctly.
Now I have so plenty of room to expand the menu that it is now a little bit Zen :lol:
We are so lucky to have a Guru like you who can communicate with us in English.

:idea: You take care fmy Friend :!: :wink:

Yves

Re: {NAV_HORIZ_DD:ID,Level depth} Looking for compact top level

Posted: Fri 18. Sep 2009, 17:04
by update
Or try
#pmenu a, #pmenu a:visited {
display: block;
width: auto;
....
}

Aaaah - I'm a little bit late... :lol:

Re: {NAV_HORIZ_DD:ID,Level depth} Looking for compact top level

Posted: Fri 18. Sep 2009, 18:28
by StudioZ
Thank you Guru Claus for your input :D
Your suggestion: width: auto;
also works but bypasses the padding values
I guess it would also be an option but... with margin values
depending on the desired rendu :wink:
Do you guys take some sleep sometime? :lol: :wink:

Cheers,

Yves