• Resolved dadams76

    (@dadams76)


    Hi Tobias again,
    I want to add background color to my table for looks. The CSS I used doesn’t work. What did I do wrong?

    Thanks again.

    Dave
    .tablepress-id-5 {
    background-color: #FFFF99;
    }

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

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    This would give a background color to the table element, but the table row elements (that are “above” the table element from a visual perspective) are white, due to your CSS. So, you will basically have to assign a background color to the rows, as you are doing already. Now, as you will be having the dates in every second row, we can use the same trick that the alternating row colors use. So, I would recommend that you uncheck the “Table Head” checkbox on the table’s “Edit” screen and then use

    .tablepress-id-5 .odd td {
    	text-decoration: underline;
    	font-weight: Bold;
    	font-family: Tahoma;
    	font-size: 20px;
    	background-color: #FFFFFF;
    }
    .tablepress-id-5 .even td {
    	background-color: #cccccc;
    }
    

    for the CSS.

    Regards,
    Tobias

    Thread Starter dadams76

    (@dadams76)

    Tobias,
    This worked.

    Thank You,
    Dave

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

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

The topic ‘Background color’ is closed to new replies.