Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:21

Fixed item width


Poster: MartinSpeed
Dated: Friday March 7 2008 - 9:06:49 GMT

Hello.
I have a menu which is made up of background images for the menu items.

I set the itemwidth to be the width of the image.

My menus, however my menus are autogenerated depending on the names for my navigational links. Sometimes my names for links are longer than the image width.

My question is, is there a way to set the width of an item so, even if the text is too long, the menu item doesn't auto grow, it stays the width i have specified. This would be mean losing some of the text. this will be acceptable as at the moment, the image tiles which is not acceptable.

Looking into this, i thought "nowrap" may be what i was looking for. But this only works for menu text which is separate words. So "This is my text" could be made to be on multiple lines, (but this can cause an image tile downwards), but "This-Is-my-menu-text" won't wrap.

Any ideas?

Cheers

Re: Fixed item width


Poster: Ruth
Dated: Friday March 7 2008 - 16:17:33 GMT

Hi,

Given you are using background images I can only suggest you use css to set that image and its properties and then call the offclass onclass in the menuStyle, or in the items that use that image. You could also try setting the width within that class to see if that will work, though I'm not sure that will do anything to prevent the menu from expanding to accommodate the text of the item. You can control the background image with the css, no-repeat, position etc.

I don't know what your image looks like so I can't make other design suggestions which you could use to allow the image to 'expand' while still keeping the look. It can be done with many images, but I'd need to see it in order to figure whether or not that could be done using css, and different menu properties.

Ruth

Re: Fixed item width


Poster: MartinSpeed
Dated: Friday March 7 2008 - 19:12:13 GMT

Thanks for your reply, I hadn't thought about the using the css functionality, i'll try that.

Thanks