Also how can i left align the text in all cells in all tables?
I found this online
.tablepress {
width: auto;
margin: 0 auto 1em;
}
But dont know how to change it to left not center
Hi,
thanks for your post, and sorry for the trouble.
Unfortunately, I’m not aware of an easy way to achieve such collapsing of blocks of rows, sorry.
Your best chance probably is to not create this as one big table, but only a few small ones that are then used inside collapsable containers (e.g. as the content section of an approach like https://tobias.baethge.com/2009/07/expandhide-accordion-feature-explained/
To left-align the table cell text, please try using
.tablepress tbody td {
text-align: left;
}
The CSS example that you posted is for centering a full table on the page.
Regards,
Tobias
Regards,
Tobias
Thanks Tobias
1)
I cut and paste
.tablepress tbody td {
text-align: left;
}
in tablepress plugin into front end option and styling CSS but it doesn’t seem to have worked. I assume it would work for all tables in the org?
2.
The Expand/Hide accordion suggestion would be pretty ugly with multiple tables as when you scroll across (using mobile) each table would not align with the columns in the table above / below. So will have to rethink my tables i guess.
ON a side note – if you do use the Accordion solution – will you be able use DataTables FixedColumns Extension 1.6 to freeze the first column still?
Hi,
1. It’s hard to tell why this is not working. Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
2. Ok, I see. Yes, this would be a drawback, I guess.
Unfortunately, using the FixedColumns in this situation will probably not work nicely. The main reason is that the calculations for the column widths are not really possible when the tables are collapsed. You could of course simply try it, maybe it works.
Regards,
Tobias