• Resolved thakeham1

    (@thakeham1)


    Hi Tobias, sorry to bother you but this has me stumped. I’ve used your custom CSS facility for years without a problem, to do simple things like change background colour for certain cells. What is weird is that I’m now finding that, for two different tables on the same page, the same custom CSS (see below) works for one table (table 6) but not for the other (table 7). I can see from developer tools that the reason is that this is because the css for table 6 is getting included in https://thakehamparish.co.uk/wp-content/tablepress-combined.min.css
    whereas the css for table 7 is not. Yet when I preview table 7 via Tablepress, it formats correctly.

    Picking up clues from previous support threads I have looked for a solution involving css minification (cache flush etc), but I have no css mini plugin installed, nor anything of that sort via my cPanel, nor can I find any css minification options within the WP theme (Manta). My best theory is based on the fact that the problem only affects custom CSS that I have created since changing WP theme to Manta, which suggests that something obscure in the theme is interfering with new custom css code findings its way to tablepress-combined.min.css. Any thoughts you have as to whether this sounds the right track, and what to do about it would be much appreciated. (Obviously, change theme is a possible solution, but with quite a lot of investment in the current theme, I’d prefer if possible to avoid that!)

    Thanks in advance.

    =================
    [Custom css in question below; code for table 6 works, but duplicate code for table 7 doesn’t, and the extra bit at the bottom for column width in table 7 is also being ignored, although it appears correctly in the tablepress preview]

    .tablepress-id-6 .row-2 .column-9 {
    background: #DCDCDC;
    }

    .tablepress-id-6 .row-3 .column-9 {
    background: #DCDCDC;
    }

    .tablepress-id-6 .row-2 .column-13 {
    background: #DCDCDC;
    }

    .tablepress-id-6 .row-3 .column-13 {
    background: #DCDCDC;
    }

    .tablepress-id-7 .row-2 .column-9 {
    background: #DCDCDC;
    }

    .tablepress-id-7 .row-3 .column-9 {
    background: #DCDCDC;
    }

    .tablepress-id-7 .row-2 .column-13 {
    background: #DCDCDC;
    }

    .tablepress-id-7 .row-3 .column-13 {
    background: #DCDCDC;
    }

    .tablepress-id-7 .column-1 {
    width: 16%;
    }

    .tablepress-id-7 .column-2 .tablepress-id-7 .column-3 .tablepress-id-7 .column-4 .tablepress-id-7 .column-5 .tablepress-id-7 .column-6 .tablepress-id-7 .column-7 .tablepress-id-7 .column-8 .tablepress-id-7 .column-9 .tablepress-id-7 .column-10
    .tablepress-id-7 .column-11 .tablepress-id-7 .column-12 .tablepress-id-7 .column-13 {
    width: 7%;
    }

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

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    In most of this CSS, the commas to separate the columns are missing. Please try again with

    .tablepress-id-7 .column-2,
    .tablepress-id-7 .column-3,
    .tablepress-id-7 .column-4,
    .tablepress-id-7 .column-5,
    .tablepress-id-7 .column-6,
    .tablepress-id-7 .column-7,
    .tablepress-id-7 .column-8,
    .tablepress-id-7 .column-9,
    .tablepress-id-7 .column-10,
    .tablepress-id-7 .column-11,
    .tablepress-id-7 .column-12,
    .tablepress-id-7 .column-13 {
      width: 7%;
    }

    Or is this not the CSS that you mean here?

    Regards,
    Tobias

    Thread Starter thakeham1

    (@thakeham1)

    Hi Tobias, although you are right to pick up the missing columns in the css relating to column width (now corrected), that isn’t the problem. The problem is that none of the custom css relating to table id 7 is working – unlike the css relating to table 6. Both tables are on the same page (see page link) but only the css relating to table 6 is getting acted-on. The css relating to table 7 is not finding its way into tablepress-combined.min.css for some reason. Thanks again.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    that’s all working for me. There’s CSS in the file for table 7, and I do see cells with a different background color in table 7 (for August and December).

    Regards,
    Tobias

    Thread Starter thakeham1

    (@thakeham1)

    Hi Tobias
    Thanks. That’s really strange. When I view the same page via Firefox, the css is working fine for both tables, but viewed via Chrome I still only get the css working for table 6, not table 7. Which might suggest a cache-related issue, but I’ve done my best to flush caches and refresh. Weird. Anyway, seems to be just an odd browser issue, thanks again for sanity-checking!
    Owen

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    yes, this might be caching-related then, as your theme (or a plugin) is stripping the cache-busting “?v=123” parameters that WordPress uses for loading JS and CSS files.
    A good strategy to test this is to use “Private” or “Incognito” tabs in the browser.

    Regards,
    Tobias

    Thread Starter thakeham1

    (@thakeham1)

    Thanks, and yes the page formats fine through other browsers and private tabs. Not the fault of Tablepress!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

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

    Thread Starter thakeham1

    (@thakeham1)

    In case anyone else encounters this problem, I’ve now found that enabling a site host feature (Siteground Optimiser) that ‘Combines CSS files’ has fixed this problem.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    yes, this looks like a (at least temporary) fix as well, as it refreshes the cache.

    Regards,
    Tobias

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

The topic ‘Custom CSS issue’ is closed to new replies.