[Support request] Responsive table mobile

Home Forums Support [Support request] Responsive table mobile

Home Forums Support Responsive table mobile

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #585573
    Roy

    Hi,
    There is an option to fix the table on this page?

    On mobile, the page width is bigger than the display…
    Can you please assist with a css that could fix it?

    Thanks

    #585747
    Leo
    Staff
    Customer Support

    Hi there,

    Unfortunately responsive tables are very difficult to achieve and best leave to a plugin.

    Give these a shot:
    https://en-ca.wordpress.org/plugins/magic-liquidizer-responsive-table/
    https://en-ca.wordpress.org/plugins/tablepress/ (premium version has responsive tables)

    Or Google responsive table to see more options.

    #1940675
    Onur

    I really need it. Please check here: https://www.swtestacademy.com/test-attributes-annotations/

    #1940727
    David
    Staff
    Customer Support

    Hi there,

    the only simple solution we can provide is to make the table scrollable.
    Add the Table inside a Group Block. With the Group Block selected go to Advanced > Additional CSS Class(es) and add: table-container

    Then add this CSS to your site:

    .table-container > div {
        padding: 0 !important;
        max-width: 100%;
        overflow-x: scroll;
    }

    If you need anything different you will need to use a plugin like Leo suggested.

    #1940731
    Onur

    Thanks David. I have already applied below one and have come to update the post. 🙂 Below CSS works well for mobile-related table issues.


    @media
    (max-width: 600px) {
    table {
    border-collapse: separate;
    border-spacing: 0;
    border-width: 1px 0 0 1px;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    width: 100% !important;
    }
    }

    #1941284
    David
    Staff
    Customer Support

    Glad to hear you found a solution!

    #1941498
    Onur

    I reduced the CSS a bit and make it like below:

    Anyone who has this kinda problem can try below CSS.


    @media
    (max-width: 600px) {
    table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    width: 100% !important;
    }
    }

    #1941752
    David
    Staff
    Customer Support

    Thanks again!

    #1945022
    Umoette

    This code helped me. Thank you @Onur

    #1945109
    Onur

    Welcome @Umoette. Happy to help.

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.