Change the forecolor of a cell

Change the forecolor of a cell

advapiadvapi Posts: 5Questions: 3Answers: 0

I've changed successfully the background color of a cell using

 createdCell: function (td, cellData, rowData, row, col) {
                        if (cellData < 0) {
                            $(td).css("background-color", "red");
                            // $(td).css('color','white','!important');

                        }
                    },

but if I try to color the text nothing happens... I should use important but it hangs the load of the data .

Any suggestion?

Thanks

Answers

  • kthorngrenkthorngren Posts: 20,139Questions: 26Answers: 4,735

    See if this example helps. Click the CSS tab to see the cell text styling.

    Kevin

  • advapiadvapi Posts: 5Questions: 3Answers: 0

    Hello, it works partially since the bootstrap.css is hiding mine even if I put important

  • kthorngrenkthorngren Posts: 20,139Questions: 26Answers: 4,735

    I think you will need to make your CSS selector more specific to match the one you want to override.

    Kevin

Sign In or Register to comment.