Need assistance shading an input in a table

Hello,

I am trying to add a yellow background to inputs on a table that are required to be filled in by the visitor on my website at the following page:

https://nnnproperties.staging.wpengine.com/client-resources/1031-calculator/

If you look closely, the required inputs have a dark grey background, while the automated outputs have a light grey border.

For the required inputs, I want to shade the background yellow. I tried to do so using a custom class, and with the following code:

On WP Page:

<table class="1031-custom-table" style="margin: auto;" border="0" cellspacing="0" cellpadding="4" width="500">

In X Theme Custom CSS Dashboard:

    #1031-custom-table .x-raw-content.mtm input.form {
        background-color: #fffeb9;
    }

Unfortunately, this doesn’t appear to be working, so I must have butchered the code. Any assistance you could offer would be greatly appreciated. Thanks!

Hi There,

You shouldn’t add the CSS class like this: class="1031-custom-table".

It should be like this: class="custom-table-1031".

The custom CSS will not work if the class is beginning the numbers.

Then the custom CSS is:

.custom-table-1031 input.form {
background-color: #fffeb9;
}

Hope it helps :slight_smile:

1 Like

Unfortunately, this isn’t what I was looking to accomplish. I only wanted to shade the cells that the user is required to fill out to run the calculation. You can tell which cells these are because they have a darker border surrounding them.

Is there an easy way to isolate only these cells to shade with a yellow background?

Thanks!

Nevermind, I figured it out. Thanks!

Glad you’ve figured it out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.