Color background for clicked nodes

72 views
Skip to first unread message

Peter Pan

unread,
May 9, 2014, 7:20:52 AM5/9/14
to jst...@googlegroups.com
Hello Ivan,

i have managed little led icons right beside node text with:

.tree li a.used {
    padding-right:20px !important;
    background:url(../images/green-on-16.png) right no-repeat;
}
.tree li a.used:hover {
    padding-right:20px !important;
    background:url(../images/green-on-16.png) right no-repeat #ffffff;
}

and a 'class'-attribute. When i clicked on a node without led and move the mouse away, i get a blue background for the node, because i have them maked blue in a custom theme.




When i clicked on a node with led, i get only a thin frame around the node, but not the blue background.



What must i do? Which file? Which css must i modify for getting a blue background on led nodes too?

With friendly regards

  Tinkerpete

Ivan Bozhanov

unread,
May 9, 2014, 9:58:38 AM5/9/14
to jst...@googlegroups.com
Well, you are overriding the background from the theme with your rules, so no background is expected (you have explicitly set #ffff). If you want to - explicitly set some other color, or in your rules do not use the shorthand "background" but set each setting individually:
background-image:url();
background-position: right center;
background-repeat:no-repeat;

Keep in mind if you want to do something with those "leds" - you'd be better off creating a sample plugin that adds a DOM element for each led.

Best regards,
Ivan

Peter Pan

unread,
May 12, 2014, 2:50:10 AM5/12/14
to jst...@googlegroups.com
Thank you Ivan,

with your detailed explanation i could solved my problem!

I noticed your tip and when i understand, how i can make a plugin,
i think about change the application. :-)

With friendly regards

  Tinkerpete
Reply all
Reply to author
Forward
0 new messages