Yeah, I know it is outside the scope of this forum in that here we talk Node-Red. But Node-Red includes CSS, and after doing some exercises it isn't making sense.
What is said, what is written and what happens.
I know I have been down this a LONG time ago. I kind of got the answer/s, but I am reluctant to look at what was told then to get it working.
I'd prefer to work on what I am seeing now.
"Background pictures".
Be they colour, picture or pattern.
I have the background pattern (tiled) on a dashboard.
(Thanks @knolleary for the recent help)
So this is the code:
<style>
.nr-dashboard-cardtitle {
text-align:center;
}
body {
background-image: url("/Pictures/metal_4.jpg");
background-repeat: repeat;
}
</style>
I get it.
It is internal CSS
.
An internal style sheet may be used if one single HTML page has a unique style.
The internal style is defined inside the element, inside the head section.
Ok. Got it.
There was coverage of where the CSS was applied.
There is the .
, #
and *
types.
#foo
is forelements with the name foo
. Got it. I think.
So in/on my dashboard, I have an element (group) called SPARE
.
I want to change the background colo(u)r of that group.
So, from how to aply internal CSS
I do this:
example from course:
The CSS rule below will be applied to the HTML element with id="para1":
#para1 {
text-align: center;
color: red;
}
So it would be:
#SPARE{
background-color:pink
}
Yeah, I picked pink only to make it stand out.
So the code in the template
node looks like:
<style>
.nr-dashboard-cardtitle {
text-align:center;
}
body {
background-image: url("/Pictures/metal_4.jpg");
background-repeat: repeat;
}
#SPARE{
background-color:pink
}
</style>
Nothing.
So, what I have seen - and did with the supplied examples - doesn't work.
Yes, I am doing something wrong. But I can't see it.
Someone - please.
For the sake of putting all the cards on the table, here are some pictures.