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

Using an image for Menu Item Separator

Poster: markfennell
Dated: Friday July 11 2003 - 11:21:50 BST

I would like to use an image as the menu Item separator
however my javascript isnt quite good enough to decipher the code :D

Any help as to where to modify the code to to this would be most appreciated!

Poster: Hergio
Dated: Friday July 11 2003 - 13:43:35 BST

As far as I know, there is no actual feature in the menu to allow you to do this. But there are two work arounds that I can think of.
First you could use the image option that is available in the menu. I.E...
This would place the image to the left of your text in the menu item. So you could put an image in the 2nd through n menus, to get a separating effect.
The other option is to put the image code right into the text label of your menu item. I.E....
aI("text=Search<img src='images/xpsearch.gif' border=0>;url=;target=_blank;");
And like I said above, arrange them so you get the right effect. Hope this helps!

Poster: zotsf
Dated: Friday July 11 2003 - 16:51:18 BST

The third option would be to simply have no text and make a seperate menu item for each seperator. This would allow you to equally apply styles (aka spacing and height) to the seperators.

By was of example...

aI("text=<img src='images/xpsearch.gif' border=0>;");

or with spaces....

aI("text= | ;");


Poster: markfennell
Dated: Friday July 11 2003 - 19:53:44 BST

Is there a way to simply hack the code so i can make the separator between menu items have a background image?

Poster: Hergio
Dated: Saturday July 12 2003 - 4:12:19 BST

Don't quote me on this, as I have not looked at the code to see if this is exactly the case, but I am pretty sure. I don't think there is a way to do that because the 'separator' that you can 'turn on' is really just drawing the border on the edge of the layer/cell that the menu consists of. There is no 'object' persay that is being drawn or invoked. Now you could hack the code to insert an entirely new layer/cell in between menu items as the separator but that would entail messing with the sizing, dimensioning, and bookkeeping of menus amongst other things. It'd be a pretty big hack. I personally liked zotsf's idea where you just create a menu inbetween all your 'real' menus and assign it a style that puts a background in there.