• Resolved kfranck

    (@kfranck)


    I would like to have no color background between rows of all my tables. What CSS code can I include Custom CSS in TablePress?

    Thanks in advance.
    kfranck

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    By default, TablePress does only add the alternating row colors, so that turning that checkbox off on the table’s “Edit” screen removes background colors. However, some themes also add colors to tables. Can you therefore 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 kfranck

    (@kfranck)

    The link is bladeelectionresults.com.

    Also, is there a way to tighten the depth of each row? If you want me to make this another post, I will.

    Thanks,
    kfranck

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the link! To remove the background colors, please add this to the “Custom CSS”:

    .tablepress,
    .tablepress tr {
        background: none !important;
    }

    I’m not sure what you mean with “depth” here. Can you explain that some more?

    Regards,
    Tobias

    Thread Starter kfranck

    (@kfranck)

    Tobias:

    Thank you for the background CSS code. It works.

    On the depth issue, I want to reduce height of each row. Can this be done?

    To give you an example of what I am talking about, please check out this old web post:
    https://toledobladedata.com/electionresults/

    This was produced using only html coding and not on WordPress. I want to convert to a WordPress site because of its ease of use.

    Any help you can provide would be helpful.

    Thanks,
    Kurt

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Kurt,

    please try this “Custom CSS”:

    .tablepress-id-1 td {
      padding: 0px !important;
    }
    .tablepress-id-1 img {
      display: block;
    }

    Regards,
    Tobias

    Thread Starter kfranck

    (@kfranck)

    Tobias:

    That worked great. Thank you.

    How do I add this code to all the tables?

    Also, I will have results from a lot of upcoming election races. Should I put the list in several tables, or just one long table? If one long list, what coding do I use between each race, so there are no borders?

    Thanks,
    Kurt

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Kurt,

    to have this apply to all tables, just remove the -id-1 from the CSS.

    Whether those upcoming races should be different/multiple tables is up to you to decide, I’m afraid. Both would probably work. To remove the borders from the table, please try the approach from https://tablepress.org/faq/remove-borders-from-a-table/

    Regards,
    Tobias

    Hi I didn’t know how to start a new forum. I couldn’t find an answer to my problem. I am trying to have the background and border to all my tables be transparent. The link to my page is: https://advantagealaska.com/about-us/ Thanks so much.

    I have this css in the plugin options:

    .tablepress-id-N,
    .tablepress-id-N tr,
    .tablepress-id-N tbody td,
    .tablepress-id-N thead th,
    .tablepress-id-N tfoot th {
    border: none;
    background-color: none;
    }

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Could you please post a link to a page that contains a table? I couldn’t find any on your site that are public.

    Regards,
    Tobias

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the link!

    I’m afraid that this table was not created using the TablePress plugin, but apparently using a theme feature. That’s why the TablePress CSS code is not working.

    You could therefore simply add this modified CSS code to your theme (maybe it has a “Custom CSS” section as well?):

    table,
    table tr {
      background: none !important;
      border: none !important;
    }

    (Adding it to the TablePress “Custom CSS” would also work, but that would be overkill, unless you plan to use the plugin for other tables.)

    Regards,
    Tobias

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘No color background rows’ is closed to new replies.