• Resolved ndren

    (@ndren)


    Hello:

    A table I’ve created has a lot of columns, so horizontal scroll is needed. However, the first two rows of the table are ‘headers’. There are 4 ‘parent headers’ in row one, and underneath each of these there are 9 subheadings (1 per column) across row 2. The problem is, when I activate horizontal scroll, the main header (row one) does not move, so you lose which main header the columns are supposed to fall beneath when you scroll over.

    Is there any way to make the main header row (row 1) move with the rest?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter ndren

    (@ndren)

    Hi Tobias:

    Thank you for your response. I actually fixed the issue, but now I cannot seem to make any of the column widths bigger. I’ve tried copying the code a bunch of different times, but the columns never get wider. Here is the link https://portal.tdra.utoronto.ca/test-mri-protocol/

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    making the columns wider via the standard code does not work here, as the table is already wider than the screen and requires scrolling. However, this code, which you add to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress, should work:

    .tablepress-id-3 .column-6,
    .tablepress-id-3 .column-11,
    .tablepress-id-3 .column-14 {
        min-width: 500px;
    }

    (notice min-width instead of width).

    Alternatively, instead of setting column widths, you could try disallowing automatic line breaks:

    .tablepress-id-3 {
      white-space: nowrap;
    }

    Regards,
    Tobias

    Thread Starter ndren

    (@ndren)

    Disallowing the automatic line breaks worked! Thank you very much for your help.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias
    ?
    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Horizontal scroll’ is closed to new replies.