• Resolved colingmurray

    (@colingmurray)


    Hi Tobias,

    I’m trying to get a fixed-header and scrolling table to show one or two rows at a time (with a scroll). I’ve added the following css under plugin options:
    .tablepress-id-1 {
    height: 100px;
    overflow: auto;
    }

    – with no effect. I also installed the fixed header extension and added “datatables_fixedheader=”top” to the shortcode without any effect, either.

    I’ve been able to get a scroll if I enclose the table in a div with class that has the same parameters as the css above, but, of course, the header row scrolls with entire table.

    Any ideas? I’m using the 2013 theme. The test page is at http://stork.mrequipment.ca/?page_id=18

    Thanks,
    Colin

    https://wordpress.org/plugins/tablepress/

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

    (@tobiasbg)

    Hi Colin,

    thanks for your post, and sorry for the trouble.

    The FixedHeader Extension should be the best approach for that fixed header. It’s installed correctly, but won’t work on this table, as that has combined cells via the #colspan# command. Unfortunately, the DataTables JS library does not work in tables that use that. You’ll need to remove all colspan from the cells.

    Regards,
    Tobias

    Thread Starter colingmurray

    (@colingmurray)

    Hi Tobias,

    Thanks for your quick reply. That seemed to fix the header issue, but I guess I had checked “enable pagination” in the options, when what I really was after is a plain scrolling down the list, without having to go “next/previous”. When I did de-select pagination in the options, the list no longer scrolls. In the “custom CSS” in “plugin options” I’ve set the height to 100px and overflow to “auto” with no effect. I think I’m missing something here…

    The end result I’m looking for should operate like this: http://www.imaputz.com/cssStuff/bigFourVersion.html

    Thanks,
    Colin

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    good to hear that the FixedHeader is now working!

    To now enable scrolling in the table, please try this approach (instead of the “Custom CSS” that you added):
    In the “Custom Commands” textfield on the “Edit” screen of the table, add this:

    "sScrollY": "200px"

    Additionally, uncheck the “Pagination” checkbox.
    If this doesn’t work directly, it might be possible that the FixedHeader Extension is not compatible with this, so that you might have to deactivate it again.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom CSS not working’ is closed to new replies.