Hi,
thanks for your question.
The best way to achieve what you want should be to simply set the column widths manually. Please take a look at the question “How can I set column widths?” in the TablePress FAQ at http://tablepress.org/faq/
Regards,
Tobias
I certainly read that, but no!
I want the column width to fit the longest line automatically and not have to tune it. The phase1 tuning I did would then actually be more acceptable to be than pixel widths.
However, will html support an automatic width setting like that? Is there a table tag for it? Or wouldn’t you rely on that?
Hi,
mmmh, ok…
You could then basically try to turn of automatic word wrapping in the table, with this “Custom CSS”:
.tablepress-id-1 th,
.tablepress-id-1 td {
white-space: nowrap;
}
With this CSS code, the browser are told to not add other line breaks into the table, so that only the ones that you added manually should be obeyed.
Regards,
Tobias
Great! This works! Thanks a lot!
More wants more: Would there be a way to exempt a certain column from that rule?
Also – all of this could perhaps be done in a tick-box?
Hi,
yes, exempting a column (column 4 in my example) is possible by adding this *after* that first block of CSS, to basically reset that setting:
.tablepress-id-1 .column-4 {
white-space: normal;
}
Doing is in a tick box is not possible though. Sorry. This is just too special and rarely used, so that it doesn’t warrant adding another checkbox to the already too crowded “Edit” screen.
Regards,
Tobias
Thank you! Great support!
Hi,
no problem, you are very welcome! 🙂
Best wishes,
Tobias