Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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!

    #1264364

    Hey 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,
    Ismael

    #1264579

    Hi 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!!

    #1265375

    Hi,

    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,
    Ismael

    #1265869

    Thank you so much for your awesome support Ismael! This works perfectly!!

    #1265871

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Table – make smaller for mobile?’ is closed to new replies.