• Resolved dalai2017

    (@dalai2017)


    Hi Tobias,

    Quick question. For one of my tables, I’m trying to change the color of the padding, specifically. I haven’t been able to figure out a code that could change this independently from the rest of the background color.

    I’ve been trying to make the padding transparent, in addition to a specific pixel size. I’m not sure if I should target the background space inside the padding with color, or target the padding with some kind of CSS code for a colorless effect.

    I appreciate all your help! Thanks.

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Unfortunately, from what I know, it is not possible to change the background color of the padding. Your best bet probably is to change the background color of the cell (which includes the padding) and then add a container for the content of the cell (e.g. a <div>) in the cell, which gets another background color.

    Regards,
    Tobias

    Thread Starter dalai2017

    (@dalai2017)

    Thanks for that info!

    I’m not familiar with the commands to create a container inside a table cell. How would the CSS command for that look?

    I was also wondering is it’s possible to change the color and thickness of the table border? In an effort to create the same effect.

    Thanks for the help.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    to add a container, just paste HTML like
    <divThis is the actual text.</div>
    into the cell.
    Then, change the cell background color and the <div>‘s background color:

    .tablepress-id-123 .row-3 .column-2 {
      background-color: #ff0000;
    }
    .tablepress-id-123 .row-3 .column-2 div {
      background-color: #00ff00;
    }

    Changing the border is also possible, e.g. via

    .tablepress-id-123 .row-3 .column-2 {
      border: 5px solid #0000ff;
    }

    Regards,
    Tobias

    Thread Starter dalai2017

    (@dalai2017)

    Thank you so much.

    I’ll mark this as resolved. If I run into any problems testing this, I may be back with a questions or two.

    Thank you!

    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!

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

The topic ‘Change Padding Color’ is closed to new replies.