Giamma
26 October 2024 18:12
1
Today, for the first time, I used some multistate switch in my dashboard.
I like it but I have a problem of alignment (dimension) how you can see in the image ...
It's possible to have the same dimension (of the button) without invent imaginative labels to have the same dimension?
Giamma
26 October 2024 19:09
4
I'm trying to specific only some multistate switch not all, but I can't, please, can you write the correct syntax?
[node-id="fa9de2b4a710bcc3"] ???? multistate-switch-label { min-width:11em; }
Still the node I'd approach is correct but I don't understand those question marks in between.
If to change only only several, it takes to address those by node's Id, the css rule remains same.
Giamma
26 October 2024 19:42
8
The question marks was to ask the correct syntax, because I tried various ways but without success ....
There should be examples shared how to target specific dashboard node. Try to search.
Ohh maybe your did but no solution. Sorry.
Giamma
26 October 2024 19:54
10
Ok, I won't bother you any further, thank you ...
It is possible for sure but yeah, without computer can't point out what exactly it takes
If you are just using two states (on/off), why not just use a standard switch node?
jbudd
27 October 2024 00:08
13
Here is an example of two multistate switches
Applying this CSS to it using a template
<style>
.multistate-switch-label {
min-width: 8em;
max-width: 8em;
}
</style>
gives
If the template is of type "Widget in group" then the styling will apply to all multistate switches on that dashboard tab.
If it is of type "Added to site header" it will apply globally.
If you change the CSS selector to
ui-card-panel#Demo_Demo .multistate-switch-label
Then it will apply only to group Demo on tab Demo
1 Like
Giamma
27 October 2024 06:02
14
jbudd:
If you change the CSS selector to
ui-card-panel#Demo_Demo .multistate-switch-label
Then it will apply only to group Demo on tab Demo
Ok, this works for me even I would prefer to indicate one or more specific node ....
Thank you very much ....
jbudd
27 October 2024 08:35
15
OK well one of my switches has id d778d422e5a1ecf5
Using the browser's Developer Tools (This is Firefox but they all have something similar) I can highlight this node and see that the selector needed is
#multiStateSwitchLabel_d778d422e5a1ecf5.multistate-switch-label
Note no spaces in this selector.
Giamma
27 October 2024 10:15
16
Yessss, works fine and now I'm ok.
Thanks again for the help (and your patience) ....
system
Closed
10 November 2024 10:16
17
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.