# Adding css to Template html script out put

**URL:** <https://discourse.nodered.org/t/adding-css-to-template-html-script-out-put/80328>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [5 August 2023 04:30 UTC](https://discourse.nodered.org/t/adding-css-to-template-html-script-out-put/80328 "2023-08-05T04:30:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vk4tux](https://avatars.discourse-cdn.com/v4/letter/v/e47c2d/32.png) [@vk4tux](https://discourse.nodered.org/u/vk4tux)\
**Post date:** [5 August 2023 04:30 UTC](https://discourse.nodered.org/t/adding-css-to-template-html-script-out-put/80328/1 "2023-08-05T04:30:43Z")

</div>

I have a template node containing this html script

```auto
<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <header></header>
    <main></main>
    <footer></footer>
    <div id="DXNewsCalendar"></div>
<script>
var url = 'https://dxnews.com/calendar.php?width=21&lang=en';
var script = document.createElement('script');
script.setAttribute('src', url);
document.getElementsByTagName('head')[0].appendChild(script);
</script>
  </body>
</html>

```

However the month numbering in top bar is white, invisible, and I wish to make it black to read ?  
How can i achieve this with css or html code please ?

Adrian

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [5 August 2023 06:58 UTC](https://discourse.nodered.org/t/adding-css-to-template-html-script-out-put/80328/2 "2023-08-05T06:58:41Z")

</div>

This is the weirdest way I have seen a page being rendered with javascript as a string, but anyway, you could use something like:

```auto
<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8">
    <title></title>
    <style>
      tr:first-child td{
      background-color:#000!important;
      }
    </style>
  </head>

```

---

<div class="post-metadata">

**Author:** ![vk4tux](https://avatars.discourse-cdn.com/v4/letter/v/e47c2d/32.png) [@vk4tux](https://discourse.nodered.org/u/vk4tux)\
**Post date:** [5 August 2023 08:29 UTC](https://discourse.nodered.org/t/adding-css-to-template-html-script-out-put/80328/3 "2023-08-05T08:29:02Z")

</div>

Thankyou, That provided a great result.  
I really appreciate it.

regards

Adrian

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 August 2023 12:22 UTC](https://discourse.nodered.org/t/adding-css-to-template-html-script-out-put/80328/4 "2023-08-05T12:22:16Z")

</div>

I can't comprehend why you would want to do it that way. If the URL returns a script, add it as a script tag, you don't need anything else?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 September 2023 12:22 UTC](https://discourse.nodered.org/t/adding-css-to-template-html-script-out-put/80328/5 "2023-09-04T12:22:42Z")

</div>

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