Hi,
thanks for your post, and sorry for the late answer. As I was on vacation, I didn’t have a chance to reply earlier.
No, this is not possible unfortunately, due to the way how tables work in browsers. There’s just no clear definition of such a behavior for tables 🙁
The best workaround would be to use a custom layout based on media queries and HTML <div> elements, instead of a table.
Regards,
Tobias
I would like the tablespress grid to go from 3 columns to 2 columns adjusting according to the browser.
Is there a way to do this?
Do you want to hide a column, then? You can hide a particular column using a CSS media query. For example, if you add this to the Custom CSS option it will hide column 3 of table ID 1 when the screen width is less than 767px:
@media only screen and (max-width: 767px) {
/* Hide column 3 of table 1 */
.tablepress-id-1 .column-3 {
display: none;
}
}
Hi,
yes, hiding a column would be possible with that CSS code. Thanks for sharing that!
But from what I understand, he wants the cells in the three columns to be rearranged so that they appear in two columns.
Regards,
Tobias
Hi
Yes, Tobias is right, I would like the columns to switch from 3 to 2 depending on browser size
thanks
Hi,
ok, thanks for the clarification.
Then a table is not the right choice for you, as I described above. You should look into a different HTML/CSS approach.
Regards,
Tobias