That is the background of the tab.
Yes, I know how to get it on the group. But there seems to be discontinuity between what the things say and what is done.
If I add a line:
#TV(1){
*Picture name here*
}
It will put a picture on/in "TV(1)"s background.
I get it.
But then the node should be saying:
TAB where it says Group
I'm confused more and more as I am learning CSS and how to do things with groups and where the areas of ownership are. (Or hierarchy? / structure?)
If you define css in the template node on a group, it is scoped to the template only (=group), ie: it will not cascade - not applied to other elements that exist outside the group.
Instead, use a template node and set the template type to <add to head section>, this is where you define the styles. You dont have to connect it to anywhere it is for the styles only (and/or additional javascript).
It will be easier if you can identify "your stuff" from "default stuff" cos for css there is a lot of "stuff".
To do so, make your adjustments also easy to find with browser dev tools
If you do it always like this, it will be easy to identify if there is any style tags without id. Or with id which does not make sense for you but for example got from some example and forgot to delete or something like that. Or duplicates ??
Just a little trick to keep things more under your control.
PS.
Don't use wording my_. but put something really yours in it.
With CSS, it doesn't matter where on the page you add the <style> tag. The styles you define apply to the entire page.
You are defining a style for the body html tag. So that applies to the <body> tag.
If you want to define the style of a group, then the CSS selector you use needs to identify the group you want the style to apply to. Each group gets its own HTML id property you can use to identify it in the CSS.
Looking at your page, I think the id of the group you want to target is TEST_Home. So your CSS would be:
#TEST_Home {
background-image: ....
}
(using the # prefix because we are using the HTML id to identify the target of the CSS style)
Page.....
In Node-Red when designing the dashboard the starting point is by creating a tab
When a tab is created, then a group must be made before anything can be added to the dashboard.
So where does page fit into this structure?
I'm asking not to be cheeky. I don't know the relationship of the terms.
On a side question:
If I have two **tabs**, .....
Again: Sorry, but where is body in relationship to tab and group? (And page?)
EDITED: Ok, so <body> is talking in CSS terms. <body> blah blah blah </body> Ok. I think I get it.
I kind of get that.
And I thought I asked that.
In the template node I have selected it with widget in group.
I name the group and deploy.
The style isn't applied to that group. It is applied to the rest of the screen.
That is not congruent to what I am reading. Or what I am seeing.
Let's maybe take baby steps.
Yes, but look at what the node settings are:
The HOME group is named.
But it (the pattern/picture) is applied to the higher level name.....
TEST if I am not mistaken.
Can you help me to this point then I can ask the next part.
Again, not to be a pain. I want to learn. But it just doesn't seem to hold any standard of what is written/said and what I am seeing happen.
The group is called Home (not HOME as you have written).
The tab is called TEST.
That means the dashboard will assign the HTML element that represents that group an id of Home_TEST. That is a fact. There is no but.
The 'template type' setting is a complete distraction from what you are trying to do. It determines where in the page the content of the template is put. As I said in my reply, it doesn't matter where the <style> block is put - its content always applies to the entire HTML document.
Andrew. The you will get there once you understand the rules.
See if this helps....
CSS <style>...<\style> wherever it is placed, will affect the whole page - (forget about groups and tabs, these are just made up sections of the page to simplify dashboard creation for users.)
There is only 1 body section in s web page.
Setting any style to body{...} applies to the whole document
If you create a <style>...<\style> in each template, each setting the same selector & style(e.g body background) only one of them will apply. To make things more manageable, put all CSS styles in a single head template (and give it an ID)
Make use of classes as much as possible. Use online styles as little as possible.
Lastly, I can't stress enough...
use Devtools to find the IDs & selector of stuff. Use the pointer to select the thing on your page you want to style, then look up the tree of elements until you find the highest point of interest.
I'll post a demo of this later to aid your understanding.
So what is the purpose of having the two modes in the template node if I select the group but it isn't applied to the group, but requires the name to be typed?
Ok, I mucked up the typing of the name HOME vs Home. Yes, I get that things are case sensitive.
But I am showing you screen shots of the names offered to me and I use/select/choose them yet they aren't used.
You want to use the ui_template node to add a custom content into a group. In this case, you'd want the content of the template to be added to the group so you can see it. This is the widget in group option.
In some cases, you may want to insert some HTML into the <head> of the page and not have it add any visible content to a group on the page. This is where you would pick the Added to site <head> section option. This can be used, for example, to add a <style> block.
I can have many "pages" (screens on the display) and they all have different backgrounds.
So somewhere there is a split between the pages.
Unless ...... Na, I don't think I am smart enough to really understand that.
What I know about CSS is little/nothing. I get that.
But I am guessing that in Node-Red for what I am doing CSS is either internal or inline.
I strongly suggest their names are changed to better reflect what they are then.
I'm stretching the imagination here, but:
Paragraph (CSS lingo/talk) equates to a group in Node-red.
Page (CSS lingo/talk) equates to a tab in Node-red.
I'm not sure.
But introducing new terms for things isn't helping. To me calling something by two different names depending on which language you are talking isn't helping.
If there is a good reason, I'm open to hear it. But please understand/remember how dumb I am.
Because I don't understand the relationship between these things isn't helping me.
So, if I want to set the property of a paragraph, I need to enter:
I am using the terms from where I am in learning CSS. They use a page, header and paragraph as the different sections of a ....... what ever you want to call it.
widget in group is the right name because it is physically inserting its content into a group on the tab.
The fact you have a <style> block in your template just means it will place that HTML into that group. But it doesn't change the fundamental rules of CSS.