• Resolved bonniee29

    (@bonniee29)


    I have looked through the support forums and couldn’t find an answer. I was able to change the header of the table colors with custom css, but the css I am writing into the plugin options section isn’t loading. I know it’s the correct code because I tested in the developers console and it worked. So why when I add it to the plugin options and reload it doesnt load?

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter bonniee29

    (@bonniee29)

    Yes! Here is the page: https://be4.com/new-target-gallery-page/

    This is the CSS in the plugin options that isnt loading:
    .tablepress-id-2 tbody td !important {
    background-color: transparent;
    }

    .tablepress thead th {
    background-color: #6abca3;
    }

    .tablepress thead th:hover {
    background-color: #fff;
    }

    .dataTables_wrapper label input,
    .dataTables_wrapper label select !important {
    float: none;
    white-space: nowrap;
    padding-bottom: 30px;
    width: 30%;
    margin: 0 auto;
    }

    .tablepress-id-2 .odd td !important {
    background-color: transparent;
    }

    .tablepress-id-2 .even td !important {
    background-color: transparent;
    }

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the link and the CSS!

    Most likely, the cause simply is that your CSS is invalid: There are !important flags after the selectors (before the {), but those must only be placed after a specific CSS command (those lines between the { and }).

    Therefore, please remove all !important that are followed by a {, please.

    Regards,
    Tobias

    Thread Starter bonniee29

    (@bonniee29)

    Hi Tobias,

    Thanks for getting back to me!! I added the important because I couldn’t get the CSS to load. I removed them and it is still not loading. I am using a CSS minifier to increase load times. Could this be affecting it?

    Thank you!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no that CSS minifier should no be part of the problem. The CSS file is loaded into the page.

    However, there’s still an !important in the very first line of the CSS. Please remove that as well.

    Then, the only CSS command that doesn’t seem to be working is the hover color of the table head row. For that, please use the second CSS command from https://tablepress.org/faq/change-background-color-table-head-row/ instead of what you have now.

    Regards,
    Tobias

    Thread Starter bonniee29

    (@bonniee29)

    Hi Tobias,

    Thanks for your response! I cant believe I made that stupid mistake with the important tags thank you for correcting me. It is working now, I think maybe a strong caching plugin I was using was preventing it. Thank you also for the header row correction. I love your plugin I will be donating to it shortly!

    Bonnie

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!
    And thanks for wanting to donate, I really appreciate that!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom CSS Isnt loading’ is closed to new replies.