Hi There,
@TotallyInformation , @Colin , @jbudd.
I need some help regarding responsive in ui_template node, the HTML and css code which i am using outside the Node-Red which working well but when i put the code in ui_template node it changes everything and so i cant make it responsive, i dont know where i am facing problem. could you please guide me well.
This is the Flow.
[{"id":"34392d109b8c22d5","type":"ui_template","z":"f71dd8c21eaabe72","group":"3a12888e4343653b","name":"Full Round","order":1,"width":24,"height":7,"format":"<!DOCTYPE html>\n<html>\n\n<head>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <script src=\"/canvas-gauges/gauge.min.js\"></script>\n\n <style>\n .canvas {\n width: 24% !important;\n /* adjust as needed */\n height: auto !important;\n /* adjust as needed */\n }\n\n @media (max-width: 600px) {\n .canvas {\n width: 50% !important;\n height: auto !important;\n\n }\n\n .canvas-container {\n display: contents;\n }\n\n .bod {\n display: table-row;\n }\n }\n\n\n .sonnenMode {\n position: absolute;\n transform: translate(-50%, -50%);\n top: 50%;\n left: 50%;\n }\n </style>\n</head>\n\n<body>\n <div class=\"bod\">\n <div class=\"canvas-container\" style=\" align-items: center;\">\n <canvas class=\"canvas\" id=\"canvas\" data-type=\"radial-gauge\" data-width=\"300\" data-height=\"300\"\n data-units=\"°C\" data-title=\"false\" data-value={{msg.payload}} data-min-value=\"0\" data-max-value=\"320\"\n data-major-ticks=\"0,40,80,120,160,200,240,280,320\" data-minor-ticks=\"6\" data-stroke-ticks=\"true\"\n data-highlights='[\n { \"from\": 0, \"to\": 60, \"color\": \"rgba(0,255,0)\" },\n { \"from\": 60, \"to\": 80, \"color\": \"rgba(255,255,0)\" },\n { \"from\": 80, \"to\": 100, \"color\": \"rgba(255,0,0)\" }\n ]' data-color-plate=\"#fff\" data-border-shadow-width=\"0\" data-borders=\"false\" data-needle-type=\"arrow\"\n data-needle-width=\"2\" data-needle-circle-size=\"7\" data-needle-circle-outer=\"true\"\n data-needle-circle-inner=\"false\" data-animation-duration=\"1500\" data-animation-rule=\"linear\"\n data-title={{msg.title}} data-value-Box=\"true\" data-value-Int=\"2\" data-value-Dec=\"2\">\n </canvas>\n\n <canvas class=\"canvas\" id=\"canvas\" data-type=\"radial-gauge\" data-width=\"300\" data-height=\"300\"\n data-units=\"°C\" data-title=\"false\" data-value={{msg.payload}} data-min-value=\"0\" data-max-value=\"320\"\n data-major-ticks=\"0,40,80,120,160,200,240,280,320\" data-minor-ticks=\"6\" data-stroke-ticks=\"true\"\n data-highlights='[\n { \"from\": 0, \"to\": 60, \"color\": \"rgba(0,255,0)\" },\n { \"from\": 60, \"to\": 80, \"color\": \"rgba(255,255,0)\" },\n { \"from\": 80, \"to\": 100, \"color\": \"rgba(255,0,0)\" }\n ]' data-color-plate=\"#fff\" data-border-shadow-width=\"0\" data-borders=\"false\" data-needle-type=\"arrow\"\n data-needle-width=\"2\" data-needle-circle-size=\"7\" data-needle-circle-outer=\"true\"\n data-needle-circle-inner=\"false\" data-animation-duration=\"1500\" data-animation-rule=\"linear\"\n data-title={{msg.title}} data-value-Box=\"true\" data-value-Int=\"2\" data-value-Dec=\"2\">\n </canvas>\n\n <canvas class=\"canvas\" id=\"canvas\" data-type=\"radial-gauge\" data-width=\"300\" data-height=\"300\"\n data-units=\"°C\" data-title=\"false\" data-value={{msg.payload}} data-min-value=\"0\" data-max-value=\"320\"\n data-major-ticks=\"0,40,80,120,160,200,240,280,320\" data-minor-ticks=\"6\" data-stroke-ticks=\"true\"\n data-highlights='[\n { \"from\": 0, \"to\": 60, \"color\": \"rgba(0,255,0)\" },\n { \"from\": 60, \"to\": 80, \"color\": \"rgba(255,255,0)\" },\n { \"from\": 80, \"to\": 100, \"color\": \"rgba(255,0,0)\" }\n ]' data-color-plate=\"#fff\" data-border-shadow-width=\"0\" data-borders=\"false\" data-needle-type=\"arrow\"\n data-needle-width=\"2\" data-needle-circle-size=\"7\" data-needle-circle-outer=\"true\"\n data-needle-circle-inner=\"false\" data-animation-duration=\"1500\" data-animation-rule=\"linear\"\n data-title={{msg.title}} data-value-Box=\"true\" data-value-Int=\"2\" data-value-Dec=\"2\">\n </canvas>\n\n\n <canvas class=\"canvas\" id=\"canvas\" data-type=\"radial-gauge\" data-width=\"300\" data-height=\"300\"\n data-units=\"°C\" data-title=\"false\" data-value={{msg.payload}} data-min-value=\"0\" data-max-value=\"320\"\n data-major-ticks=\"0,40,80,120,160,200,240,280,320\" data-minor-ticks=\"6\" data-stroke-ticks=\"true\"\n data-highlights='[\n { \"from\": 0, \"to\": 60, \"color\": \"rgba(0,255,0)\" },\n { \"from\": 60, \"to\": 80, \"color\": \"rgba(255,255,0)\" },\n { \"from\": 80, \"to\": 100, \"color\": \"rgba(255,0,0)\" }\n ]' data-color-plate=\"#fff\" data-border-shadow-width=\"0\" data-borders=\"false\" data-needle-type=\"arrow\"\n data-needle-width=\"2\" data-needle-circle-size=\"7\" data-needle-circle-outer=\"true\"\n data-needle-circle-inner=\"false\" data-animation-duration=\"1500\" data-animation-rule=\"linear\"\n data-title={{msg.title}} data-value-Box=\"true\" data-value-Int=\"2\" data-value-Dec=\"2\">\n </canvas>\n </div>\n </div>\n</body>\n\n</html>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":550,"y":1120,"wires":[[]]},{"id":"fa4233d162f7fd32","type":"inject","z":"f71dd8c21eaabe72","name":"","props":[{"p":"payload"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"2","payloadType":"num","x":130,"y":1160,"wires":[["34392d109b8c22d5"]]},{"id":"3a12888e4343653b","type":"ui_group","name":"Full Round","tab":"32f743da73ff5571","order":2,"disp":false,"width":24,"collapse":false,"className":""},{"id":"32f743da73ff5571","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]