# Help with ui-tabulator Column Headings Required

**URL:** <https://discourse.nodered.org/t/help-with-ui-tabulator-column-headings-required/98423>\
**Category:** General\
**Tags:** dashboard-2\
**Created:** [31 July 2025 18:12 UTC](https://discourse.nodered.org/t/help-with-ui-tabulator-column-headings-required/98423 "2025-07-31T18:12:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [31 July 2025 18:12 UTC](https://discourse.nodered.org/t/help-with-ui-tabulator-column-headings-required/98423/1 "2025-07-31T18:12:39Z")

</div>

I have the following table and I would like to centre the column headers of a couple of the columns;

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/4/348a6509dec11359774fe57585c3d9a353b8440d.png)

I wish to centre the Protocol & Power headers and so far I have not found a way to do it, so any ideas will be welcome.  
As can be seen I have tried `hozAlign` but that did not work

This is the template code used to generate the above

```javascript
msg.tbInitObj = {
   "maxHeight": "100%",
   "pagination": "local",
   "paginationSize": 10,
   "paginationCounter": "rows",

   "columns": [
      {"title": "Model Name", "field": "modelID", "width": "20%"},
      {"title": "Type", "field": "type", "width": "22%"},
      {"title": "Protocol", "field": "protocol", "width": "10%"},
      {"title": "Brand", "field": "brand", "width": "14%"},
      {"title": "Attribute Set", "field": "attributeSet", "width": "18%"},
      {"title": "Power", "hozAlign": "center",
         "columns": [
                     {"title": "Source",  
                      "field": "powerSource",    
                      "width": "8%",
                      "formatter": "lookup", 
                      "formatterParams": {"battery": "Battery", "mains": "Mains"}, 

                     },
                     {"title": "Type",    
                      "field": "powerType",      
                      "width": "8%",

                     }
                    ]
      }

   ]

}

```

I would also like to vertically centre the column headers Model Name -\> Attribute Set in the two row space created by the split header Power.

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [31 July 2025 21:16 UTC](https://discourse.nodered.org/t/help-with-ui-tabulator-column-headings-required/98423/2 "2025-07-31T21:16:20Z")

</div>

This is actually a question to Tabulator...  
Anyway, for headers, you should use `headerHozAlign`  
For example:

```auto
{"title": "Details","headerHozAlign":"center",
     "columns": [...

```

As far as I know there is no way to "merge" the top & bottom header rows of "regular" (non-nesting) columns and center the title vertically across the merged cell (like we do in Excel). I assume there could be some CSS tricks for this.

One thing you could do is to bring the title to the bottom row (by nesting it under a blank parent row), e.g.

```auto
"columns": [
   {"title":"", "columns": [
      {"title": "Model Name","field": "modelID", "width": "20%"},
      {"title": "Type", "field": "type", "width": "22%"},
   ...

```

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [31 July 2025 22:31 UTC](https://discourse.nodered.org/t/help-with-ui-tabulator-column-headings-required/98423/3 "2025-07-31T22:31:34Z")

</div>

> [@omrid](#):
>
> `"headerHozAlign":"center"`

Thank you for this. I will leave the other headers at the top for the time being.

---

<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:** [14 August 2025 22:32 UTC](https://discourse.nodered.org/t/help-with-ui-tabulator-column-headings-required/98423/4 "2025-08-14T22:32:10Z")

</div>

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