• Resolved adamovic

    (@adamovic)


    Hi Tobias!

    I’ve been trying to manually remove as much of my custom CSS as possible, since I have a lot of tables, where I set the ‘text-align’ and ‘vertical-align’ for basically every column of every table. I thought it would be better to somehow target all columns of all tables with one rule.

    But I can’t get the CSS to work.
    Here’s what I’ve tried so far:
    1.
    [class*=”column-“]

    2.
    .tablepress thead tr th,
    .tablepress tbody tr td

    3.
    .tablepress thead th,
    .tablepress tbody td

    4.
    [class*=”tablepress-id-“] [class*=”column-“]

    None of these selectors work. Do you have any idea why or another example I could try?

    Thanks!
    Adam

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    This should actually work fine:

    .tablepress thead tr th,
    .tablepress tbody tr td {
        text-align: center;
        vertical-align: middle;
    }

    Regards,
    Tobias

    Thread Starter adamovic

    (@adamovic)

    It’s no trouble, I like a challenge here and there 🙂

    Speaking of which, I offer my sincere apologies for opening this thread and I feel a bit embarrassed because it turns out the problem was that I made a typo which commented out the entire rule. Because I didn’t edit the code inside the plugin interface and just pasted it in, I didn’t notice.

    Oh well, thank you anyway.

    And by the way Tobias, I’ve been dealing with optimising CSS and JS on my website for weeks now and it turns out that Tablepress is one of the best written plugins I use as apart from optimizing the CSS (which I wrote anyway), there is nothing I can optimize more. Thumbs up!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Target all columns with CSS’ is closed to new replies.