lsl
Junior Member
Posts: 2
Registered: 1/18/2004
Member Is Offline
|
| posted on 1/21/2004 at 01:55 PM |
|
|
same level different background colors
I see a post from a few months ago where someone wanted different colors on the same level and had done it with multiple menus. He was told to look
at the "wrap" information. I've been looking but it seems that the text color is changing. Could someone kindly post an example of
CODE for each item in level 0 for instance to be a different color background? (and in which file)
|
|
|
RM
Super Administrator
Posts: 24
Registered: 12/16/2003
Member Is Offline
|
| posted on 1/28/2004 at 03:12 PM |
|
|
For exampe we need a menu item with red font color on blue background.
1. Find and open menu hierarchy file (menu_file/items.js by default) with a text editor.
2. Find a desired menu item. Assume the menu item caption is 'ITEM1'
3. Replace 'ITEM1' with the following string :
myWrap('ITEM1')
4. At the end of the file add the following lines:
function myWrap(text) {
return '<table width="100%" height="100%" bgcolor="blue"><tr><td><font
color="red">'+text+'</font></td></tr></table>'
}
Another solution more simple:
Instead of 'ITEM1' write the following line:
'<table width="100%" height="100%" bgcolor="blue"><tr><td><font color="red">Item
1</font></td></tr></table>'
But this solution has a disadvantage. You should insert same string for each menu item that you want to be colored in the desired way.
In contrast to the first solution where you should write myWarp('Item 2') only.
|
|
|