| Author |
Message |
JasonVU Guest
|
Posted: Mon Jun 23, 2003 8:49 pm Post subject: Background colors for nodes |
|
|
Is there a way to make the background color for nodes span the entire width of the menu instead of just over the text part of the node? Thanks for any help!
Jason |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Tue Jun 24, 2003 3:53 pm Post subject: |
|
|
Yes, there is some way.
Let's assume that your tree has "Tree1" name (i.e. it was created with the followin initialization string: "new COOLjsTree('Tree1', ...)"). If it is so, then you can define CSS classes in the form "cls<Tree Name>_back<Level Number>". These classes will be applied to individual items (one item is one separate table) of the specified level. E.g.:
| Code: | .clsTree1_back1 {
width: 120px;
background-color: red;
}
.clsTree1_back0 {
width: 120px;
background-color: blue;
}
.clsTree1_back2 {
width: 120px;
background-color: green;
} |
These lines of CSS code will make your tree look like block of 120 px, level 0 will have blue items, level 1 - red items, and level 2 - green items. |
|
| Back to top |
|
 |
guldam Guest
|
Posted: Tue Aug 26, 2003 10:31 pm Post subject: Background colors for nodes |
|
|
I've been trying to apply the background colors for nodes as you've shown us here, but I'm having zero luck.
1. I'm not using the proversion of cooltrees
2. I put this in my stylesheet:
.clsTree1_back1 {
width: 120px;
background-color: red;
}
.clsTree1_back0 {
width: 120px;
background-color: blue;
}
.clsTree1_back2 {
width: 120px;
background-color: green;
}
3.My tree is called: Tree1
4. the Tree works fine and dandy but I can't change bgcolors.
5.tree1_format.js has this for item #11 but I also got rid of this and it didn't work:
//11. styles for each level of menu (default style will be used for undefined levels)
[clsTree1_back1,clsTree1_back0,clsTree1_back2],
Any ideas?
Guldam |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Tue Aug 26, 2003 11:24 pm Post subject: |
|
|
I've tested that sample before posting - things were fine...
What is the version of your cooltree.js? Can you quote your initialization sequence (new COOLjsTree...)? |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Aug 27, 2003 12:45 am Post subject: |
|
|
// Title: COOLjsTree
// Version: 1.4.0.
<script language="JavaScript">
var treeName = "Tree1";
new COOLjsTree (treeName, TREE1_NODES, TREE1_FORMAT);
</script>
I'm still scratching my head. oh, I'm using this in a frameset.
Thanks,
Guldam |
|
| Back to top |
|
 |
guldam Guest
|
Posted: Wed Aug 27, 2003 12:59 am Post subject: Background colors for nodes |
|
|
http://www.fishyfish.com/img/leftnav.gif
Also, will the pro version of cooltree allow me to make it cosmetically look like the image I've linked to? My client will accept nothing less. errrg.
Thanks,
Guldam |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Wed Aug 27, 2003 2:28 am Post subject: |
|
|
Regarding background colors. Sorry, but it just works. Can you send your files zipped to jssupport@cooldev.com?
Regarding your tree sample. In this particular case Pro will not work better than non-Pro (tech.support team can help you setting this sample up: contact alx@cooldev.com - me - or galchenok@cooldev.com). But make sure that you really don't need other features of Pro. |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Aug 27, 2003 9:54 pm Post subject: Post subject: Background colors for nodes |
|
|
I guess I'm missing something. I just downloaded a fresh copy of all the files from:
http://javascript.cooldev.com/testdoc/tree/samples/cooljstree.zip
I added a fresh copy of the cooltree.js file to this folder. The Tree works perfectly. If I add the following classes to the stylesheet, I get no change in background color and nothing else appears to be affected in the tree.
.clsTree1_back1 {
width: 120px;
background-color: #FFFF00;
}
.clsTree1_back0 {
width: 120px;
background-color: blue;
}
.clsTree1_back2 {
width: 120px;
background-color: green;
}
I've put this up on my personal website for testing purposes.
http://www.fishyfish.com/cooljstree
Sorry to be a pain.
Guldam |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Aug 28, 2003 5:58 pm Post subject: |
|
|
For whatever strange and bizarre reason, I've gotten the background colors to work on the cooltree. I started from scratch yet again, and don't think I did anything differently, but I must have had a bug somewhere.
Now that I have things working, is there a way I can alternate row colors on clsTree_back2 (level three)?
thanks,
Guldam |
|
| Back to top |
|
 |
AlexKunin Developer
Joined: 03 Jan 2003 Posts: 1191
|
Posted: Mon Sep 01, 2003 12:50 am Post subject: |
|
|
Regarding misterious things that happen. Probably, some cache - browser's or some intermediate proxy...
Reagarding color alteration. Sorry, can't understand: all previous posts in this topic were about this. Probably I don't get something... Please explain me. |
|
| Back to top |
|
 |
|