# How to remove the gap between template node and other nodes?

**URL:** <https://discourse.nodered.org/t/how-to-remove-the-gap-between-template-node-and-other-nodes/81158>\
**Category:** Dashboard\
**Created:** [9 September 2023 14:59 UTC](https://discourse.nodered.org/t/how-to-remove-the-gap-between-template-node-and-other-nodes/81158 "2023-09-09T14:59:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thematrixrearwindow](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@thematrixrearwindow](https://discourse.nodered.org/u/thematrixrearwindow)\
**Post date:** [9 September 2023 14:59 UTC](https://discourse.nodered.org/t/how-to-remove-the-gap-between-template-node-and-other-nodes/81158/1 "2023-09-09T14:59:45Z")

</div>

My template node's code is the following:

```auto
<style>

.container
{
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
}

.button
{
    background-color: red !important; 
    color: white !important;
}

.error_code
{
    color: #DFFF00 !important;
}

</style>

<div class="container">
    <span ng-if="msg.payload === 'true'">Alarm: Error-Code: {{ msg.error_code }}</span>
    <md-button ng-if="msg.payload === 'true'" class="button" ng-click="send({payload: {cmd: 'stop', error_msg: msg.error_msg, error_code: msg.error_code}});">
        CONFIRM
    </md-button>
    <span ng-if="msg.payload !== 'true'">Alarm: Kein Alarm</span>
</div>

```

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/5/05deb2c611461d51877140d372256e49a83fe53f.png)

I thought i just have to set margin and padding to zero, but that did not remove the gap between the template node "Alarm: Kein Alarm" and the under laying node "Position" (which is a regular text-node).

Can anybody help me?

---

<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:** [9 October 2023 15:00 UTC](https://discourse.nodered.org/t/how-to-remove-the-gap-between-template-node-and-other-nodes/81158/2 "2023-10-09T15:00:11Z")

</div>

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