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

Confused on Names of items

Poster: dmacman
Dated: Wednesday January 4 2006 - 19:30:37 GMT

Hi All,

I am trying to setup some new menus (php ,mysql) and I still do not understand the difference between...

and all the 'other' widths.

Wouldn't all 3 be the same if using an image?

Wouldn't item and image be the same at least?

I am getting text that wraps to the next line, double images, and it sets the menuwidth to the width of the text, instead of 'My' 97px, in IE.

In Firefox, it works perfectly, of course, a non-MS product!!!



Poster: Ruth
Dated: Wednesday January 4 2006 - 20:36:26 GMT


Think of the menu as a container in which you have other little containers - items, so

menuwidth is the width you set for the container

itemwidth is the width for the item/container

imagewidth is the width for an image in the item in the menu

One of the problems you are having has to do with the fact that you are putting in a bgimage, that's a background image and it will repeat, as background images do. Image and bgimage function differently. So, you can set imagewidth all you want, but I don't think it's going to do anything to the bgimage. I think you can do that if you want to put it in using css and classes. Not width, but no-repeat and such.

To get what you want, at least until someone uses IE with accessibility set to change font size, or NN, FF which do it automatically, you need to set

menuwidth=591; and itemwidth=95; in the menu properties section

with(milonic=new menuname("Main Menu")){
menuwidth=591; is a demo for css and the menu.


Poster: dmacman
Dated: Thursday January 5 2006 - 14:44:26 GMT

Hi Ruth,

Thanks for the reply.

The challenge I have is the PHP MySQL code from Milonic has a table called styles, which it draws the info for (oncolor, align, etc.).

The info you suggest adding is built on the fly with php and they do not get any data from the 'styles' table, it is all hard-coded into the script.

I tried to dissect their script to have it insert the two lines...

... but have not got it to work yet. I will try to reply to Andy's TS ticket and post the code to phpbuilder (were there are some AWESOME php gurus [like weedpacket] who usually are very helpful, kinda like you!



Poster: dmacman
Dated: Friday January 6 2006 - 13:16:26 GMT

Hi Ruth,

I love forums!!!

One of the really good php coders posted a solution to your suggestion, and I changed my code like you suggested.

In the Menu Properties, the itemwidth and menuwidth are set (with no " or px). But I am getting and button, then the text to the right of the button, then the next button, and so forth.

The way the PHP is written, the attributes (ie, itemwidth=95 menuwidth=591) are set in the Menu Properties, like you sugggested, but also in the 'Global' Menu properties
( correct term for the...
"with(miniStyle=new mm_style()){
menu that comes before the menu properties.
What is this part of the menu 'officially' called???

I will have to try and change the code to not use these values in both places.

The way the code is written now, it will take 'all' setting in the styles menu and automatically use them in the 1st 'with(miniStyle=..." menu.

And in the Menu Properties, which is where you told me to put them.

Any ideas on the offset text/buttons?

I am getting close, with your and others help.

I look forward to getting this working, so that other php users can benefit from this awesome tool!



Poster: Ruth
Dated: Friday January 6 2006 - 15:14:51 GMT

H Don,

Actually, Global refers to the properties right at the top, i.e. subOffsetLeft= and, in order, the others are, style, menu, and item properties. On the main site menu under DHTML Menu link there is a Menu Quick Reference Guides item.

Many of the properties can be placed in more than one area, and depending on where you place them they function differently, not that they don't do the same thing, but they get applied differently. For example, let's take align, that can be a style property, a menu property or an item property. If place in the style, it will apply to all items in all menus that use that style, if placed in a menu it will apply to all items in that menu, if placed in an item it will apply only to that item.

What do you mean about offset/text buttons?


Poster: dmacman
Dated: Friday January 6 2006 - 15:54:05 GMT

Hi Ruth,

Thanks for the , ongoing, training on 'Milonic Speak.'

As far as the offset/test buttons, if you go to that link, you will see the it shows the button, then to the right of that button, the text that 'should' be over that button, but is besides it. And then it repeats for all the buttons.

That is what I meant.

I am trying to figure out why its doing this.



Poster: Ruth
Dated: Friday January 6 2006 - 16:12:38 GMT

Hi Don,

Ah, well, that's not really a text offset, it's where it's supposed to be. It looks as if you are now using the little tabs as images and not background images. So, the text sits next to them.

I'm sorry I don't know anything about php to really help on this. To do what you want you really need to have those tabs as bgimages, then the text goes over them. And, you need to set the itemwidth if you want it to be only so wide, but as I said, if someone sets font to really big, then the item will either expand for the font, or the words will wrap and the tab will repeat down, unless you set up the tab background through css and use css to set no-repeat. That's what the css styling link was so you could take a look at how you do bgimages with it, but I don't know how you use that and incorporate it into a php styled menu.


Poster: dmacman
Dated: Friday January 6 2006 - 20:00:15 GMT

Hi Ruth,

I am getting close.

If you go here you will see it looks like what I want.

The issue is, the 'Production' button 'was' set to scroll and gave you a bunch of other sub menus that had sub menus. But now, it acts like a url instead of a sub menu.

What did I break?