WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
WP-Table Reloaded Not Taking CSS edits. (10 posts)

  1. Shan
    Member
    Posted 2 years ago #

    I put my CSS edits in the plugin options panel and usually it takes and keeps the edits even with an update. However, this time it is not. I have all the boxes checked and the CSS is there.

    http://lastshredsofsanity.com/skewed-design-studios (click tab for portfolio and scroll down a bit)

    How do I fix this?

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for your report.

    Yes, the CSS is indeed there.
    Can you explain what is happening after you click "Update Options"? Are there any error messages? And what are you trying to change in the code?
    Does it work to just change the state of the checkboxes (i.e. without changing the "Custom CSS" textarea)?

    Regards,
    Tobias

  3. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    thanks for your report.

    Yes, the CSS is indeed there.
    Can you explain what is happening after you click "Update Options"? Are there any error messages? And what are you trying to change in the code?
    Does it work to just change the state of the checkboxes (i.e. without changing the "Custom CSS" textarea)?

    Regards,
    Tobias

  4. Shan
    Member
    Posted 2 years ago #

    I want to remove the background color so it is transparent and change the border colors.

    When I hit save, it tells me the changes have been saved, but nothing actually changes.

    I have not tried unchecking any of the check boxes yet.

  5. Shan
    Member
    Posted 2 years ago #

    Ok, if I uncheck the "Yes, include and load the plugin's default CSS Stylesheets. This is highly recommended, if you use one of the JavaScript libraries!", my edits show up.

    I thought the plugin options was supposed to overwrite the plugin's default CSS?

  6. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Shan,

    thanks for the update.

    I need to ask another question for clarification: When you say "When I hit save, it tells me the changes have been saved, but nothing actually changes.", do you mean that nothing on the page with the table changes (visually), or that the text contents of the "Custom CSS" textarea have reverted to the content before you made modifications in that field and hit "Save"?

    And you are correct that the "Custom CSS" overwrites the default CSS, but sometimes that requires some more efforts, as theme CSS could be involved, etc.

    Now, from what I can see, the background colors should be as desired now? Do you still want to change border colors somewhere?

    Regards,
    Tobias

  7. Shan
    Member
    Posted 2 years ago #

    I mean that nothing changes visually. LOL

    Yes, everything looks right now, but I am unsure if not loading the default CSS will compromise the functionality of the tables.

    Why is the Custom CSS not overriding the default?

  8. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    ah, ok :-) Thanks for clearing this up :-) Initially, I'd thought that the actual saving is not working, and not the visual results.

    The reason that the Custom CSS is not overriding the default CSS usually is a something like a "conflict". This means that there are two (or more) CSS commands that try to change the same property on the same elements. These commands don't need to come from the Custom CSS or default CSS though. They could also come from the theme's CSS for example, as many themes contain CSS code to style tables.
    Usually there are two major ways of settling these conflicts: You would either have to make the CSS selector more specific (i.e. the .wp-table-reloaded-id-.... part), by instead using CSS/HTML IDs instead of CSS classes, or you can try to raise the priority of a given command (this usually is quicker and easier), by adding the !importantkeyword.
    Example:
    If some CSS like

    .wp-table-reloaded-id-123 td {
      background-color: transparent;
    }

    does not result in a change,

    .wp-table-reloaded-id-123 td {
      background-color: transparent !important;
    }

    will likely do.
    This example shows another possibility on why (in the example) the background color does not change: The CSS only changes the background color of the actual cells to transparent. However, the actual rows (which you can imagine as a layer below the cells), or even the table itself, can still have a background color that is different to the page's background color.

    I hope that this explanation was not too confusing :-)

    Regarding not loading the default CSS:
    This basically will only "hurt" if you actually have a table on the page, that shall have the default styling (i.e. the default color set, default fonts, and probably some borders). If you are overriding the CSS of all tables with custom styling anyway, removing it is no problem.

    Best wishes,
    Tobias

  9. Shan
    Member
    Posted 2 years ago #

    Well I tried adding !important; to the CSS and letting the default CSS load, but it didn't work.

    I'll either have to keep it this way or find the table id's and do it that way. Which is annoying because I may add a new table at some point and forget that I need to add the id to the custom CSS. LOL

    I'm still not sure why this worked in the past but since the last update it won't.

  10. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    yes, working with the table's HTML is a little bit more work, but actually it's not really that difficult, as they all follow a pattern, too:
    Instead of the class (.wp-table-reloaded-id-123), the IDs are

    #wp-table-reloaded-id-123-no-1

    The -no-1 part is (usually) the same for all tables, it's just necessary to change it if the same table is shown twice on the same page (which nobody really ever does).

    But really, I wouldn't worry too much, just leave the default CSS turned off (or do you need it for another table?).

    And I don't really see why this should have worked before the update and not now. Nothing has changed in the CSS handling for a long while...

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic