# Change layout algorithm to prevent ui groups from stretching across the webpage on wider displays

**URL:** https://discourse.nodered.org/t/change-layout-algorithm-to-prevent-ui-groups-from-stretching-across-the-webpage-on-wider-displays/77483
**Category:** Dashboard
**Created:** [12 April 2023 08:43 UTC](https://discourse.nodered.org/t/change-layout-algorithm-to-prevent-ui-groups-from-stretching-across-the-webpage-on-wider-displays/77483 "2023-04-12T08:43:06Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![probitie](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/probitie/32/71100_2.png) [@probitie](https://discourse.nodered.org/u/probitie)
#### Post date: [12 April 2023 08:43 UTC](https://discourse.nodered.org/t/change-layout-algorithm-to-prevent-ui-groups-from-stretching-across-the-webpage-on-wider-displays/77483/1 "2023-04-12T08:43:06Z")

</div>

Hi. Users of my node-red dashboard webpage have different screen sizes. I configured layout for width 960px and it looks great until I open it with near 1900px, those groups that were one under another moved on the same line, the whole layout became a totally mess. I restricted max size for 1080 px, but on my screen it occupies only a half of a screen, leaving two areas on both sides empty.

What I want is to save group ordering that was on 1080px width for 1900px and more. I read the documentation [http://stevesnoderedguide.com/node-red-dashboard](http://stevesnoderedguide.com/node-red-dashboard) and found that actually dashboard uses grid but also it uses special algorithm to place nodes. Is there a way to somehow change or modify that algorithm? Or maybe there is a more easy and obvious step

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [12 April 2023 10:10 UTC](https://discourse.nodered.org/t/change-layout-algorithm-to-prevent-ui-groups-from-stretching-across-the-webpage-on-wider-displays/77483/2 "2023-04-12T10:10:30Z")

</div>

If you want to force the layout always to be a particular way, then a solution is to put them all in one group rather than multiple groups.

---

<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: [12 April 2023 16:46 UTC](https://discourse.nodered.org/t/change-layout-algorithm-to-prevent-ui-groups-from-stretching-across-the-webpage-on-wider-displays/77483/3 "2023-04-12T16:46:29Z")

</div>

There is a way but that puts you on charge to manage it. Takes to know at least something about CSS strategies of layouting

Explore this

> [@A bit different dashboard layout](https://discourse.nodered.org/t/a-bit-different-dashboard-layout/71869):
>
> Sometimes the default layout just doesn't do the trick. And we have been agreed with it as there is not much to do with it. Well, I was forced a bit to think again ... There isn't too much but it may open some possibilities to play with it. [{"id":"4e7e0d90ee7aa1ad","type":"ui\_template","z":"bf0d83d32eec75c2","group":"674712f8d915bcc0","name":"A bit different layout","order":7,"width":0,"height":0,"format":"\<style id='different-layout'\>\n .masonry-container {\n position: relative;\n…

---

<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: [12 May 2023 16:47 UTC](https://discourse.nodered.org/t/change-layout-algorithm-to-prevent-ui-groups-from-stretching-across-the-webpage-on-wider-displays/77483/4 "2023-05-12T16:47:24Z")

</div>

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