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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    That’s not too difficult: Just add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress .column-1,
    .tablepress .column-3 {
      font-weight: bold;
    }

    Regards,
    Tobias

    Thread Starter ulotrix

    (@ulotrix)

    Thank you. It works. But I have a one more questions.

    I want to make special css for all starting id with “MY_”. How can I do that? For example I have two table “MY_table1” and “MY_table2”. I want to apply one css to two of them. But in future I would have 10 tables starting with “MY_”.

    I tried this:

    `.tablepress[id^=’MY_’] .column-1 {
    width: 18%;
    }

    But it didn’t work.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    The ID of the actual <table> HTML element is different from the table ID in the scope of TablePress. The HTML has the form

    tablepress-{table ID}

    Thus, you’d need to change your CSS to

    .tablepress[id^="tablepress-MY_"] .column-1 {
      width: 18%;
    }

    As a suggestion: A better way of grouping your tables here (for the CSS) might to use “Extra CSS classes”. See https://wordpress.org/support/topic/possible-to-group-tables-and-apply-custom-css?replies=2 and https://wordpress.org/support/topic/extra-css-classes?replies=6 for some explanations on this.

    Regards,
    Tobias

    Thread Starter ulotrix

    (@ulotrix)

    Works like a charm. Thank you so much.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Make bold 1st and 3rd column value in all tables’ is closed to new replies.