• Resolved aka_sh

    (@aka_sh)


    Hi there!

    First of all, the plugin is really great! I’d donated once to the author and I think it won’t be the last one.

    And the question is:
    My super-secure hosting doesn’t provide FTP/SSH connections for a user under which a web server is running. This means that I can’t save Custom CSS (Plugin -> Options -> Custom CSS) in a file. Yet it works with “inline” method, throwing custom css code into each web page header.

    I wanted to override default TablePress with my theme style.css but it didn’t work cause tablepress css is included AFTER the style.css. I guess it’s an intentional act.

    To sum up: is there any way to move Custom CSS code to the theme’s style.css?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,

    thanks for your post, and sorry for the trouble.

    Yes, you can move your “Custom CSS” to the style.css. You’ll basically just have to be more “aggressive” with the CSS classes used. Most likely, it will already be enough if you prepend table to all .tablepress or .tablepress-id-123 selectors, like

    table.tablepress-id-123 thead th {
      ...
    }

    and similar.

    If that does not yet work, you can append the !important keyword to each CSS declaration, like

    .tablepress-id-123 .column-2 {
      background-color: #ff0000 !important;
      font-weight: bold !important;
    }

    Regards,
    Tobias

    Thread Starter aka_sh

    (@aka_sh)

    Tobias, thank you for you lightning answer!
    Indeed, it worked out, more or less. By the way, why the default background color for a table header is chosen the way it makes the text in the header hard to read? (See the page snippet: )

    Hi,

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

    The default background color for the table head row is a light blue, that should be pretty good to read — unless of course your theme sets a default text color that is very light.

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: TablePress] Customize tables CSS in the theme's style.css’ is closed to new replies.