Skip to main content
Nintex Community Menu Bar
Question

CSS: Table Cells: Background Color

  • July 9, 2024
  • 2 replies
  • 68 views

Forum|alt.badge.img+8

I’d like to adjust the color of 2 different “columns” in a table using CSS.  The table has 8 or so columns.  How do I identify only those 2 columns?

2 replies

Forum|alt.badge.img+20

For those two columns, use template fields, allow HTML and set the class in the HTML. Then set CSS as per the class you named in the HTML of the template field.


Forum|alt.badge.img+1
  • July 9, 2024

Hi Scott,

Create a Javascript snippet and add that snippet to that field

You can try with this snippet

var $ = skuid.$;var field = arguments[0];
var value = arguments[1];

switch( field.mode ){
case ‘edit’:
skuid.ui.fieldRenderers[field.metadata.displaytype].edit( field, value );
break;

case 'read':
case 'readonly':
    var cellElem = field.element;
    var iconElem =
        $( '<div>' )
            .css('background-color', 'salmon');
            .appendTo( cellElem );

}

-cheers,
Charles M