Help knowing what I need to change in the CSS file

Help knowing what I need to change in the CSS file

Lonnie.HullLonnie.Hull Posts: 32Questions: 11Answers: 0
edited August 2019 in Free community support

Hello,

I'm creating a web page that shows totals. Works great, thanks to everyone that helped me.

I've been asked to make the total line show differently than the other lines. Here's my existing code for the function.

<html>
    <head>
 <title>Totals</title>


<link rel="shortcut icon" href="\\fileprint1\shares\Common\k_s\config\favicon.ico" />


<script type="text/javascript" src="\\fileprint1/shares/Common/k_s/config/jquery-3.3.1.min.js"></script>

<link rel="stylesheet" type="text/css" href="\\fileprint1/shares/Common/k_s/config/jquery.dataTables.css" />
<script type="text/javascript" src="\\fileprint1/shares/Common/k_s/config/jquery.dataTables.min.js"></script>

<link rel="stylesheet" type="text/css" href="\\fileprint1/shares/Common/k_s/config/select2.min.css" />

<script type="text/javascript" src="\\fileprint1/shares/Common/k_s/config/rowGroup.min.js"></script> 
<script>
$(document).ready(function() {
    $('#example').DataTable( {
        "paging": false,
        order: [[0, 'asc']],
        rowGroup: {
            startRender: null,
            endRender: function ( rows, group ) {
                var salaryAvg = rows
                    .data()
                    .pluck(4)
                    .reduce( function (a, b) {
                        return a + b.replace(/[^\d]/g, '')*1;
                    }, 0);
                salaryAvg = $.fn.dataTable.render.number(',', '.', 0, '$').display( salaryAvg );
 
                var ageAvg = rows
                    .data()
                    .pluck(4)
                    .reduce( function (a, b) {
                        return a + b*1;
                    }, 0) / rows.count();
 
                return $('<tr/>')
                    .append( '<td colspan="3">Total for '+group+'</td>' )
                    .append( '<td/>' )
                    .append( '<td>'+salaryAvg+'</td>' );
            },
            dataSrc: 0
        }
    } );
} );
</script>

......

I believe I would edit the select2.min.css, but not sure which entry.

Any help would be appreciated.

Thanks

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    Hi @Lonnie.Hull ,

    You don't need to change the default CSS files - just add a class to your colspan and use CSS to style that.

    Cheers,

    Colin

  • Lonnie.HullLonnie.Hull Posts: 32Questions: 11Answers: 0

    Colin,

    Thank you. I'll look into this later today.

    Thanks again.

This discussion has been closed.