I want to separate menu items in two parts.

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
db
Advanced
Advanced
Posts: 15
Joined: Tue Feb 08, 2005 5:59 pm

I want to separate menu items in two parts.

Post by db »

I want to separate menu items in two style parts. One will contain date and other text.
Do I need to use CSS?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

You can have as many different styles as you need within the menu itself. The 'default' that comes in the download is called menuStyle. Simply write more using a different name.
John
db
Advanced
Advanced
Posts: 15
Joined: Tue Feb 08, 2005 5:59 pm

Post by db »

Well but I dont know how to apply that inside one menu item.
The date in this line should have different style:
aI("text=9.3.2005 UWATEC - Aladin Prime;url=produkt02_05.html;");
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,
Various style properties are also item properties, so if you wanted to change the offbgcolor, offcolor, onbgcolor, oncolor, for example you would code it like this:

Code: Select all

aI("text=9.3.2005 UWATEC - Aladin Prime;offbgcolor=#ffffff;onbgcolor=#000000;offcolor=#000000;
oncolor=#ffffff;url=produkt02_05.html;");
Other properties such as the font properties are also applicable in an item.

Ruth
Last edited by Ruth on Wed Mar 09, 2005 5:35 am, edited 1 time in total.
db
Advanced
Advanced
Posts: 15
Joined: Tue Feb 08, 2005 5:59 pm

Post by db »

Ok, but what I am saying is: I need to use diferent styles within one menu item
i.e.
style1 9.3.2005
style2 UWATEC - Aladin Prime

in this line:
aI("text=9.3.2005 UWATEC - Aladin Prime;url=produkt02_05.html;");

Thanks
Daniel B.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Well, as far as I know, you can't use the menu styles to do that, though you can do some things to make them different. I can't think of any way for the item to tell the menu program "I want you to make these words this style but make those other words this other style."

What you can do is change the font color, size, and style using html coding, but be careful on changing size, that affects how the rest of the menu items line up, if you make it too big the other items will be off as to where the text appears.

So, if you want to change the color and style, you can use this

Code: Select all

aI("text=<font color='#CC00CC' size='1.5em'><b>9.3.2005 agd</b></font> UWATEC - Aladin Prime;url=produkt02_05.html;"); 
I tried using pixels and pts but it really goes crazy in different browsers, so if you want to do something with size you either have to use em or you can put another html bracket and use big i.e.

Code: Select all

aI("text=<font color='#CC00CC'><big><b>9.3.2005 agd</b></big></font> UWATEC - Aladin Prime;url=produkt02_05.html;"); 
I do not recommend you do anything with size, it causes problems with how the other items in the menu look, unless it's a vertical menu, then perhaps it would be OK.

Ruth
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Here is a menu that will split content into 2 columns, it's a little convoluted but it does work very well across browsers:

Code: Select all

with(milonic=new menuname("columntest")){
style=menuStyle;
margin=20;
firstColumnWidth=130
aI("text=<span style='float:left;width:"+firstColumnWidth+"px;'>12.01.05</span>Some Text;url=/someurl.html");
aI("text=<span style='float:left;width:"+firstColumnWidth+"px;'>05.02.05 - 05.23.05</span>Another Date, just for fun;url=#");
aI("text=<span style='float:left;width:"+firstColumnWidth+"px;'>05.02.05</span>Some Date with More text;url=#");
aI("text=<span style='float:left;width:"+firstColumnWidth+"px;'>05.02.05</span>So, This is how you do columns inside meun items;url=#");
}

Hope this helps,
Andy
Post Reply