Hey there, i am new to Node-Red Dashboard 2.0.
I am struggling to give my button the CSS-Class i want. Whe ni double click the Node to open the Properties and give a "Optional CSS-Class", nothing happends. When i look with DevTools in the Broswer i cant see any new Class. I tried to set a class with a change-Node but i cant get that to work either. Please help me, i am struggling with something so basic!
(I use a template with CSS for all Pages)
Edit: i found my CSS-Class... in the parent div. Obviously my button doesnt get any of the styling except height and width and even that doesnt work correctly.
Have a good day, and thank you very much for your help!
I can set the Class, but the button itself doesnt get it, only the div around it. Class ist "my-custom-button".
When i add any styling to the css class nearly nothing transfers to the button itself.
I tried some more and i have to rephrase it. i CAN change the css like i can add a z-index, position absolute and placement etc. But i somehow cant change the "look" of the Button itself. Neither the backgroundcolor, nor the border-radius or the font color, etc.
Like most widgets they are not just a button or anchor or table or ... They are a div containing a bunch of things like spans, tooltips, labels, etc. Therefore, the class is put at the highest point so that you can affect everything within using an appropriate selector.
The reason you are not affecting the button will be because the selector you use in your CSS is not of sufficient specificity.
You can adjust the overall dashboard density in the dashboard settings if that helps?
In cases like yours, what I tend to do is open the devtools and play with the styles on the various elements within the widget until it does what I like. Then I replicate that in CSS.