NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Devan on April 16, 2012, 01:09:26 AM

Title: Drop menu width
Post by: Devan on April 16, 2012, 01:09:26 AM
Hello again all,

I have a Double Drop menu on my web app, but on one of them, the menu text on a few items are quite long, and I notice that the 'drop down' box does not scale width-wise to cater for long descriptions.  I am guessing that I will have to delve into the CSS to change the width of that box - is that contained under the 'nt-menu' definition in 'all.css' ??

Thanks!
Title: Re: Drop menu width
Post by: Bruce on April 16, 2012, 10:51:20 AM
Use firebug to inspect and see....
Title: Re: Drop menu width
Post by: Devan on April 16, 2012, 02:55:11 PM
Done!

Bruce, could you make the following change to jquery-nt-menu.css for future revisions?:

Code: [Select]
.nt-menu > li ul a {
display: block;
width: auto;
padding: 5px;
text-decoration: none;
}

'width' was hard set to '152px'.  If you set to 'auto' then the menu scales according to the text width better.
Title: Re: Drop menu width
Post by: Bruce on April 16, 2012, 10:14:30 PM
Hi Devan,

I'll check into that, but I presume you are aware that you can simply add the following to your custom css file;

.nt-menu > li ul a {
   width: auto;
}

That overrides my default setting.

cheers
Bruce

PS - thanks for the tip - I'll investigate the change - but wanted you to understand you don't _need_ me to do this.
Title: Re: Drop menu width
Post by: Bruce on April 16, 2012, 10:28:08 PM
I think maybe the better setting is;

   width: auto;
   min-width: 152px;

that sets a minimum width, but allows it to get bigger as well.

cheers
Bruce