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:46

Couple problems/question with the Background Menu Item Image


Poster: kelemvor
Dated: Wednesday January 28 2004 - 3:03:18 GMT

Howdy, I'm using this menu: http://www.milonic.com/menusample.php?sampleid=20

and I have a couple questions.


--I'm playing with the sample and for some reason the top menu item keeps displaying as the word MILONIC. It loads up with the proper name of whatever I call it, but then it automatically changes itself to MILONIC every single time. Can't seem to figure out what the heck makes it do that.

--Is there any way to have the menu always be a specfic width and to wrap if the line gets too long? THe image I am using is a specific size and needs to display the whole thing or it looks dumb.

--Is there any way to have the picture stretch itself to fit the size of the wording (1 line, 2 lines, etc)?

Just some initial things I'm thinking of.

Thanks.


Poster: Ruth
Dated: Wednesday January 28 2004 - 4:39:17 GMT

1. If you're getting the milonic link, it sounds like you do not have a licensed version yet.

2. You can set the itemwidth=10; or whatever number you need.
Code:
with(milonic=new menuname("Main Menu")){
style=background;
top=10;
left=10;
alwaysvisible=1;
itemwidth=50;
This means the item is 50px and anything that goes beyond that will wrap. So just set the menu size to the image size, but remember if you have any padding listed in the defined style.

3. The item bgimage will repeat, but you have to keep in mind that if your image has edges then if it repeats twice it will look like two images that have no space between but still two images. I suggest you open the sample menu_data.js file and add that itemwidth=50; to the main menu and then type in a bunch of works after the word HOME, save it and then open the menu.htm file that came with it and you will be able to see what happens. It will give you an idea.

It would be easier to help if you had even a test page up with your menu and the image to be able to see what you have.

Ruth


Poster: kelemvor
Dated: Wednesday January 28 2004 - 13:11:13 GMT

OK, Itemwidth is what I was looking for. and yeah, I figured the image would repeat and look stupid which is why I didn't know if it could be set to Stretch the image instead of just repeating.

But I am doing all this on a test area so I can see how it works so we'll be fine.


Poster: Ruth
Dated: Wednesday January 28 2004 - 17:47:46 GMT

You might be able to fix your image so it matched in such a way as to not look as if it were repeating. I'm not sure if the menu has a way to set a norepeat and then make sure the back ground is set then you could code it to be 'centered' in the image item with a surrounding background, but I'm not sure you can do that inside a menu item. But, it's a question I think I will ask in the forum.


Ruth


Poster: John
Dated: Wednesday January 28 2004 - 19:26:24 GMT

If it doesn't matter if your image looks 'stretched', try imagewidth to match itemwidth.


Poster: kelemvor
Dated: Thursday January 29 2004 - 1:13:22 GMT

Can I put the ITEMWIDTH somewhere in the file that I only have to put it once and not for each sub menu too?


Poster: John
Dated: Thursday January 29 2004 - 14:05:23 GMT

itemwidth is also a Style property.

I would suggest a reading assignment - http://www.milonic.com/forum/viewtopic.php?t=2981. :roll: