Like the other user said. Put it inside div or p tags and change the background color of that specific object.
How to apply css background color to text only, in datatables cell
-
10-10-2022 - |
Frage
I'd like to apply background color css to text in a datatable cell. Currenytly I can only apply the color to the whole cell, how can I apply it only to the text in the cell? Here is what I am using now:
$.each(aData, function(ii,value2){
if (value.sTitle == "Priority" && aData[i] != ""){
$('td:eq(' + i + ')', nRow).css('background-color', '#F6CED8');
}
});
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow