Support » Plugin: TablePress » No borders for specific rows

  • Resolved Mewbatz

    (@mewbatz)


    Hello, I’ve got a very large table and I want to seperate some parts of it with empty rows.
    Is there any way to do so? Because I can only remove the borders from a whole table but not for a specific row.

    I have borders for all tables:

    .tablepress,
    .tablepress tr,
    .tablepress tbody td,
    .tablepress thead th,
    .tablepress tfoot th {
    	border: 2px solid black;
    }

    And I want to remove the border from row 2 at table (ID)1 and tried it like this:

    .tablepress-id-1 .row-41 tr,
    .tablepress-id-1 .row-41 tbody td,
    .tablepress-id-1 .row-41 thead th,
    .tablepress-id-1 .row-41 tfoot th {
    	border: none !important;
    }

    But the border is still there and I’ve tried it with and without !important.
    Is it not possible to do it this way?

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

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    To remove the borders for a specific row again, you could try this “Custom CSS”:

    .tablepress-id-1 .row-41 tr,
    .tablepress-id-1 .row-41 td,
    .tablepress-id-1 .row-41 th {
    	border-left: none !important;
    	border-right: none !important;
    }

    (As you probably want to keep the top and bottom border, the CSS here only removes the left and right borders of the cells and the row.

    Regards,
    Tobias

    Thanks for your reply.

    It’s better now but it only removes the inner borders for the specific row, the outside borders at the right and left side are still visible.

    Is it possible to remove the last two pieces of border as well?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    those borders are probably the result of adding the border to the table element as well.

    Please try shortening

    .tablepress,
    .tablepress tr,
    .tablepress tbody td,
    .tablepress thead th,
    .tablepress tfoot th {
    	border: 2px solid black;
    }

    to

    .tablepress tbody td,
    .tablepress thead th,
    .tablepress tfoot th {
    	border: 2px solid black;
    }

    Regards,
    Tobias

    Thanks a lot, that fixed the problem!

    Only the very first row have lost the upper border but that’s going to be blanc anyways. And for other tables I can simply add it back in.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    No problem, you are very welcome! 🙂 Good to hear that this helped!

    For the first row, adding !important again (for both adding borders and then removing them) should work.

    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 ‘No borders for specific rows’ is closed to new replies.