• Resolved not2old2learn

    (@not2old2learn)


    Using Responsive Theme by cyberchimps. How can I apply a class to a group of tables? I use your plugin to create a lot of tables many of which are the same structurally just different content in the cells, row and column headers are the same. To hide columns at different viewports I would have to enter css for each table several times for each @media. Isn’t there a way to create a table class like “mytable” which could then be styled one time and called with the short code on the page.
    For example:
    table.mytable .tablepress .column-3 {
    display: none;
    }

    and then on the page have something like this
    <table class=”mytable”>[table id=”100″ /]</table>

    Can’t seem to get anything to work using this concept. Responsive theme already has a .table class so I don’t know if that’s the problem or not. If I can’t apply a class then I would have to add styling for each @media size for each table which would be extensive. Thanks in advance for your help.

    http://wordpress.org/extend/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your question!

    Something like this is possible with the “Extra CSS classes” feature in TablePress.
    By using that checkbox on the “Edit” screen of each table, you can add a CSS class (like “mytable” to every desired TablePress table). That CSS class will then be added to the table automatically, so that you could use

    .tablepress.mytable .column-3 {
      display: none;
    }

    Changing the Shortcode or wrapping the Shortcode in more HTML code is then not necessary (that would in fact be a working approach as well, but only if you use a <div> container and not a <table>).

    Regards,
    Tobias

    Thread Starter not2old2learn

    (@not2old2learn)

    Thanks Tobias it worked perfectly.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    very nice! 🙂 Great to hear that this helps!

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add a class to style groups of tables’ is closed to new replies.