-
AuthorPosts
-
November 27, 2020 at 10:58 pm #1263606
Hi,
Is it possible to make the table element smaller in width, showing all the data for responsive displays (instead of stacking the data or making the table scrollable)? Please see below for an example.
Thank you for your advice!
December 2, 2020 at 4:05 am #1264364Hey designyvr,
Thank you for the inquiry.
This should be possible if we set the table data to collapse to the next line and if set the table to inherit the width of the view port or browser screen. Please try this code in the Quick CSS field.
@media only screen and (max-width: 767px) { .responsive .avia_scrollable_table .avia-data-table > thead > tr > th, .responsive .avia_scrollable_table .avia-data-table > tbody > tr > th, .responsive .avia_scrollable_table .avia-data-table > tfoot > tr > th, .responsive .avia_scrollable_table .avia-data-table > thead > tr > td, .responsive .avia_scrollable_table .avia-data-table > tbody > tr > td, .responsive .avia_scrollable_table .avia-data-table > tfoot > tr > td { white-space: wrap; } .avia_scrollable_table .avia-table { width: 100%; } .avia-data-table .avia-pricing-row td, .avia-data-table .avia-pricing-row th { text-align: center; font-size: 18px; line-height: 1.3em; } }
Best regards,
IsmaelDecember 2, 2020 at 10:47 pm #1264579Hi Ismael,
This is fantastic, thank you for your help!
One question, is it possible to get the text to wrap within the table cells, so the text doesn’t overlap the cells next to them?
Thank you!!
December 7, 2020 at 4:34 am #1265375Hi,
Thank you for the update.
We added an invalid value to the white-space property above. Please look for this css code above.
.responsive .avia_scrollable_table .avia-data-table > thead > tr > th, .responsive .avia_scrollable_table .avia-data-table > tbody > tr > th, .responsive .avia_scrollable_table .avia-data-table > tfoot > tr > th, .responsive .avia_scrollable_table .avia-data-table > thead > tr > td, .responsive .avia_scrollable_table .avia-data-table > tbody > tr > td, .responsive .avia_scrollable_table .avia-data-table > tfoot > tr > td { white-space: wrap; }
Adjust the value of the white-space property from “wrap” to “normal”.
.responsive .avia_scrollable_table .avia-data-table > thead > tr > th, .responsive .avia_scrollable_table .avia-data-table > tbody > tr > th, .responsive .avia_scrollable_table .avia-data-table > tfoot > tr > th, .responsive .avia_scrollable_table .avia-data-table > thead > tr > td, .responsive .avia_scrollable_table .avia-data-table > tbody > tr > td, .responsive .avia_scrollable_table .avia-data-table > tfoot > tr > td { white-space: normal; }
And as suggested above, we could decrease the size of the text in the cells so that they do not overflow outside the cells.
Best regards,
IsmaelDecember 8, 2020 at 11:19 pm #1265869Thank you so much for your awesome support Ismael! This works perfectly!!
December 8, 2020 at 11:23 pm #1265871Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Table – make smaller for mobile?’ is closed to new replies.