Closed sujaypatil96 closed 2 years ago
Is that style revealed in inspected code of generated HTML? If so then its probably current main.css stylesheet overriding that .htCenter class. Would it be just 2nd row that you'd like centred headers for, or both first and 2nd rows?
Hm, it's not revealed in the inspected code HTML code. I was just going through the CSS and JS files to see where we could modify it so that the headers can be center aligned.
Would it be just 2nd row that you'd like centred headers for, or both first and 2nd rows?
Just the first row for our use case.
Looks like htCenter is getting applied to entire table rather than the individual header areas, which is a problem in that it triggers cell contents to be centred too. I think one needs to approach those header cells via css path: E.g. modify main.css and override #grid th:
#grid thead > tr:first-child > th div.relative {text-align: center; color: red}
#grid th {
/* text-align: left; */
}
Actually I think this is more to the point: / To left align 1st and second row headers, uncomment this. Otherwise first two rows of column headers are centered./
text-align: left;
}
/ To center 2nd row headers, uncomment this style. /
text-align: center;
}
I think I can close this now. Reopen if any issues encountered.
Is there any way to configure the alignment of the headers that are created in the DataHarmonizer grid? I see the handsontable JS library is being used to create the grid, and it seems adding the property,
className: 'htCenter'
to theHandsontable()
in themain.js
file isn't doing the trick.