Use multiple lines and styles for single menu item

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
mnw
Beginner
Beginner
Posts: 9
Joined: Mon Nov 01, 2004 12:51 pm

Use multiple lines and styles for single menu item

Post by mnw »

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
Attachments
Web_looknfeel_04.jpg
Web_looknfeel_04.jpg (110.06 KiB) Viewed 5293 times
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Use multiple lines and styles for single menu item

Post by Ruth »

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
mnw
Beginner
Beginner
Posts: 9
Joined: Mon Nov 01, 2004 12:51 pm

Re: Use multiple lines and styles for single menu item

Post by mnw »

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://milonic.com/cbuy.php;bgimage ... _on_01.gif;");
aI("text=About Us 02;url=http://milonic.com/contact.php;bg ... _on_02.gif;");
aI("text=About Us 03;url=http://milonic.com/newsletter.php;b ... _on_03.gif;");

}[attachment=0]Untitled-1.jpg[/attachment]
Attachments
Untitled-1.jpg
Untitled-1.jpg (87.02 KiB) Viewed 5287 times
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Use multiple lines and styles for single menu item

Post by Ruth »

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: Select all

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://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
mnw
Beginner
Beginner
Posts: 9
Joined: Mon Nov 01, 2004 12:51 pm

Re: Use multiple lines and styles for single menu item

Post by mnw »

Thanks Ruth,

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

Many thanks

Mnw
Post Reply