# Tutorial - align multiple multistate switches

**URL:** https://discourse.nodered.org/t/tutorial-align-multiple-multistate-switches/59054
**Category:** Dashboard
**Created:** [27 February 2022 08:10 UTC](https://discourse.nodered.org/t/tutorial-align-multiple-multistate-switches/59054 "2022-02-27T08:10:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [27 February 2022 08:10 UTC](https://discourse.nodered.org/t/tutorial-align-multiple-multistate-switches/59054/1 "2022-02-27T08:10:37Z")

</div>

Hi folks,

Used my multistate switch node yesterday for the first time myself, and appeared that all my switches were incorrectly aligned due to labels of different length. Then I suddenly remembered that our CSS magician @hotNipi had solved this some time ago in a Github issue.

Since this might be useful for other users also, I have described his way of working in [this](https://github.com/bartbutenaers/node-red-contrib-ui-multistate-switch/wiki/Align-switches-with-labels-of-different-length) wiki tutorial:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/c/5c582d1a10062ce0b74f0f28c525c46eaa706e9b.png)

Bart

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [27 February 2022 17:10 UTC](https://discourse.nodered.org/t/tutorial-align-multiple-multistate-switches/59054/2 "2022-02-27T17:10:47Z")

</div>

Hi Bart,

This begs the question - could the nodes figure out this setting automatically ?  
Or perhaps an easier option, put a label width setting in the config of the node ?

---

<div class="post-metadata">

### Author: ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)
#### Post date: [27 February 2022 18:16 UTC](https://discourse.nodered.org/t/tutorial-align-multiple-multistate-switches/59054/3 "2022-02-27T18:16:48Z")

</div>

> [@Sean-McG](#):
>
> could the nodes figure out this setting automatically ?

Widgets don't know that there is any other widget on the page.

Allowing some simple config option may actually make overriding it more complex so the default is more than enough.

The page design can't be forced or restricted in any terms at widget level.

---

<div class="post-metadata">

### Author: ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)
#### Post date: [27 February 2022 18:20 UTC](https://discourse.nodered.org/t/tutorial-align-multiple-multistate-switches/59054/4 "2022-02-27T18:20:10Z")

</div>

Had to ask 😉

---

<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: [29 March 2022 18:20 UTC](https://discourse.nodered.org/t/tutorial-align-multiple-multistate-switches/59054/5 "2022-03-29T18:20:44Z")

</div>

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