I am trying to define a custom CSS class 'ctr_col' to centre align the contents of some string columns in a wpDataTable created from a Gravity form. I am then inserting the 'ctrl_col' in the "CSS class(es)" field in the relevant column settings. However the string is remaining left aligned. Should I be aligning something other than text to centre align
Please can you advise?
This is an exact paste of what I have put in the settings area:
I am trying to define a custom CSS class 'ctr_col' to centre align the contents of some string columns in a wpDataTable created from a Gravity form. I am then inserting the 'ctrl_col' in the "CSS class(es)" field in the relevant column settings. However the string is remaining left aligned. Should I be aligning something other than text to centre align
Please can you advise?
This is an exact paste of what I have put in the settings area:
table.wpDataTable td.ctr_col {
text-align: center;
}
Don't worry I've worked it out myself.
I only needed to add the following in the Custom css field on the CUSTOM JS AND CSS within the WPDT settings area:
.ctr_col { text-align: center !important;}
Now I can use that custom CSS class .ctr_col to centre any column.
Hoorah!
Thanks
Good news, Chris.
Thanks for letting us know the issue has been resolved.
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables