Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
Basically, this CSS just forces a "word wrap" style on the column headers, so if the text of the header goes 'wider' than its container, the words are going to wrap on new lines.
Let us know if that makes sense and if you have any questions.
Hi
Please scroll in the related URL to the last table near the bottom.
On many columns, I have a long header, usually with two words and a short number for the data rows.
In order to make the table more compact, I want to reduce the width of the rows by splitting the labels into two lines. For example:
Instead of:
Nominal Diameter.
I want it in two lines:
Nominal
Diameter
I tried to do it by writing "Nominal<br>Diameter" and other various tricks but was not successful.
What is the right way?
Thanks,
Erez
Hi Erez,
html is not converted in the header currently.
But I think you can use css to create a break if the line is too small.
For that you can try this css code.
table.wpDataTable th { white-space: normal !important; }
Kind regards
Jens
Works!
Thanks
Erez
Hi, Erez
Sorry for the delayed response
Hey, Jens, thank you very much for helping us out once again with the working solution
We truly appreciate it.
Let us know if there is anything else we can help with, Erez.
Thank you
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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
Does this work on column names with more than two words or is there going to be a break at every space with this solution?
Hi, Heather.
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
Basically, this CSS just forces a "word wrap" style on the column headers, so if the text of the header goes 'wider' than its container, the words are going to wrap on new lines.
Let us know if that makes sense and if you have any questions.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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