Centering group names

Hello,

I have been trying to center a group name above some icons, but whatever i try and searched the forums, no luck. Example:

image

Would this need a different approach? Thinking about adding a row above the icons and enter text and center that.

Thanks,

Ed.

Are you trying to center PIR? Can you provide your dashboard nodes?

Yes, it's PIR that needs to be centered. I'll try a workaround and if that fails i'll provide my nodes.

Ed.

When i add a row above the icons, it seems to solve what i want. But then it seems to push down the icons and the frame hight shows a difference.

image

I'll tinker a bit more with this.

Ed.

All right,

Adding a row above the left group fixes this, but that's not really what i wanted. The name "Locatie" is unneeded in my opinion. I could color it in the same color as the background, but that would be an awkward solution.

image

Allmost there though...

Ed.

Then you'll need to do it for every group. Add empty text row where header is not needed.

But then you'll get the situation showed with picture two. The word "Location" is unwanted but when i leave it empty the groups are no longer aligned.

Ed.

How about a space " " - so sort of empty....
Or if you don't mind all headings being centred... add a ui_template to the page with some CSS like

<style>
.nr-dashboard-theme ui-card-panel p.nr-dashboard-cardtitle {
    text-align: center;
}
</style>

Yep, the single space did the trick. Why didn't i think of that?

image

Thank you!

Ed.

Be advised that now you have all card titles centered :wink:

You mean horizontally for additional groups? Planning to add group for door switches.

Vertically they are aligned to the left.

Ed.

1 Like

Can you give an example as to how you do that? I tried but got zip....

Perhaps take a look on this node

I use this very often for similar purposes