• Resolved Davinder

    (@davinderschiedel)


    Is there a way to add code to the table block CSS so that tables like this have a scrollbar on mobile?

    At the moment it tries to expand.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can try and add CSS for Responsive Table Scroll through Appearance > Customize and select Additional CSS.

       /* Wrap tables in a scrollable container on small screens */
       @media (max-width: 768px) {
           .wp-block-table {
               overflow-x: auto;
               display: block;
               white-space: nowrap;
           }
       }

    overflow-x: auto; property allows horizontal scrolling, while white-space: nowrap; prevents the table from wrapping, keeping it within a single scrollable line.

    Thread Starter Davinder

    (@davinderschiedel)

    Excellent. Works well.

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