Dashboard template add stylesheet?

Hello,
I'm trying to add stylesheet into dashboard template. Like this:

<link rel="stylesheet" type="text/css" href="/home/pi/static/html/Stylesheet.css">

is it even possible or do I have to use allways style tag and add my style into each template for its own?

It does work but you have given a filing system path and not a URL.

You need to put the CSS file where it is accessible as a web resource. For example, configure your static folder in settings.js and put it there. Then you can reference it as a URL served by Node-RED.

I assume that you have configured the static folder and the folder is called "static" and you have folder "html" in it where you have that CSS file, then the href should be:

href="/html/Stylesheet.css"

Thats it, thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.