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

Use multiple lines and styles for single menu item


Poster: mnw
Dated: Friday September 10 2010 - 13:43:39 BST

Hi All,

I was wondering / hoping there was a way to :

firstly :break menu items into multiple lines. Not just using 'wrap' but to actually control where line breaks (carriage returns) occur within a single item.
secondly : to use multiple styles within a single menu item.

Basically I want a title for each menu item in my dynamic menu and then a very small paragraph about the titled section. (example attached...hopefully)

Any chance?

Cheers

Re: Use multiple lines and styles for single menu item


Poster: Ruth
Dated: Friday September 10 2010 - 17:41:05 BST

Hi,

I'm sure that can be done. What I need is an explanation of the picture so I know what each 'item' is. I am assuming that each one of those 3 things is really a part of one item? If that is so, please let me know what each is supposed to be. That is, which parts are comments, which parts are to be an item that either opens a submenu or is a link? Then I will try to work on something to see if I can get what you want. What would also help is if you could give me the menu coding for whatever menu you are creating. That is, if these are parts of a submenu, I'd like the full submenu coding so I can create your items

Ruth

Re: Use multiple lines and styles for single menu item


Poster: mnw
Dated: Friday September 10 2010 - 18:00:03 BST

Cheers Ruth.

Yes there are just 3 buttons here (3 effective menu items). Eack has an off state and an ON state (text for these being the same but for incolour). Each has a background OFF image and an background ON image. I'm not sure what you mean by comments? None of the text will contain and hyperlinks and the entirety of each of the 3 items is a link to a page (submenus). Worth mentioning though that this entire panel IS a vertical submenu droping down from a horizontal main menu. ALso worth mentioning that the image posted previously is a mock-up. Attached here is wht it actually currently looks like.

Code follows for the submenu style and the style therefor:
It is still based on the original Milonic code. (early days)

with(submenuStyle=new mm_style()){
styleid=1;
borderstyle="solid";
fontfamily="Verdana, Tahoma, Arial";
fontsize="14pt";
fontstyle="normal";
fontweight="bolder";
headercolor="#000000";
align="left";
valign="top";
left=15;
offcolor="#ff3300";
oncolor="#ffffff";
padding=8; //was 4
subimagepadding=10;//was 8
itemwidth=242;
itemheight=70;
top=5;
}

//moved main menu from here

with(milonic=new menuname("Aboutus")){
margin=5;
style=submenuStyle;
aI("text=About Us 01;url=http://www.milonic.com/cbuy.php;bgimage=images/dropdown_off_01.gif;overbgimage=images/dropdown_on_01.gif;");
aI("text=About Us 02;url=http://www.milonic.com/contactus.php;bgimage=images/dropdown_off_02.gif;overbgimage=images/dropdown_on_02.gif;");
aI("text=About Us 03;url=http://www.milonic.com/newsletter.php;bgimage=images/dropdown_off_03.gif;overbgimage=images/dropdown_on_03.gif;");

}[attachment=0]Untitled-1.jpg[/attachment]

Re: Use multiple lines and styles for single menu item


Poster: Ruth
Dated: Friday September 10 2010 - 19:52:27 BST

Hi,

OK, I misunderstood what you were asking. I thought the top and bottom items where like headers or titles or such. You can do about anything you want in an item. So, as an example, the first item, try coding it like this and see if that is what you meant.

Code:
aI("text=<font size=3><b>Consultation</b></font><br><br>We take your problems & submit them to <br>our ThinkTank of professionals to come up<br>with a solution for you and your needs<br>;url=http://www.milonic.com/cbuy.php;");


You can also use what you are calling styles in items. Below my name is a set of links, the bottom 3 to style, item and menu properties. If you take a look at those, you will see that many of the 'styles' properties can also be used in items. So, let's say you have a style set for a particular menu that uses offbgcolor='red'; and you want one item in that menu to have an offbgcolor='blue', well you can do that by putting offbgcolor=blue; in that item. Same thing for the off/onbgimage, or off/onbgcolor, or off/oncolor padding and so on. Please note the difference, when you set that offbgcolor in the style it must be set in quotes, but in the item do not use quotes.

I hope this helps

Ruth

Re: Use multiple lines and styles for single menu item


Poster: mnw
Dated: Tuesday September 14 2010 - 20:51:43 BST

Thanks Ruth,

You've given me some stuff to work with.
I can tweak from here on in...I think.

Many thanks

Mnw