CSS of label

51 views
Skip to first unread message

Rasmus Aveskogh

unread,
Nov 18, 2009, 2:41:39 PM11/18/09
to javascript-information...@googlegroups.com

Hi,

Is it possible to change the CSS and perhaps even define HTML for the
label in a Spacetree? I've seen that one can set innerHTML,
but say that I for example want a gradient background on the entire
label. How would I approach that? I would also like to define
a border.. but lineWidth does not seem to set border får rectangular
nodes.. or do I need to define a separate color for it?

-ra

Nico Garcia Belmonte

unread,
Nov 19, 2009, 1:14:16 PM11/19/09
to javascript-information...@googlegroups.com
you can do this just by setting any style property in your domElement object

domElement.style.border = "1px solid red";

You can do this with any other CSS property you want.
If you'd like to know more about CSS please take a look here:

http://www.w3schools.com/css/


--

You received this message because you are subscribed to the Google Groups "JavaScript Information Visualization Toolkit" group.
To post to this group, send email to javascript-information...@googlegroups.com.
To unsubscribe from this group, send email to javascript-information-visua...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-information-visualization-toolkit?hl=en.





--
I would never die for my beliefs because I might be wrong.

Bertrand Russell

Rasmus Aveskogh

unread,
Nov 19, 2009, 3:12:06 PM11/19/09
to javascript-information...@googlegroups.com

Thanks!

This works fine for border like you described .. but the script doesn't even run at all with something like:

style.background-image = "url(img.png)";

-ra

Rasmus Aveskogh

unread,
Nov 19, 2009, 3:59:17 PM11/19/09
to javascript-information...@googlegroups.com

I got it working using the same pattern I noticed the other style-settings used.. i.e:

style.backgroundImage = ...

Thanks anyway!

-ra
Reply all
Reply to author
Forward
0 new messages