fixedheader question

fixedheader question

eastofthesuneastofthesun Posts: 12Questions: 4Answers: 0

Hi

Im using:

$(document).ready( function () { var table = $('#table_id').DataTable(); new $.fn.dataTable.FixedHeader( table,{ "left": true} ); } );

works fine but the zebra coloring vansihed on the fixed column...how do I get it back?

thanks in advance

Answers

  • xmojmrxmojmr Posts: 18Questions: 2Answers: 3
    edited May 2014

    I use following css to get it back. To find it I checked what is the style (through Chrome Developer Tools), where does it come from and then copy/pasted exact signature from the original css into mine

    table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
        background-color: #E0FFE3;
    }
    
    table.dataTable.stripe tbody tr.even, table.dataTable.display tbody tr.even {
        background-color: white;
    }
    
  • eastofthesuneastofthesun Posts: 12Questions: 4Answers: 0

    great...but where do you execute it since the header init will override the css?

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Can you please link to a test case showing the issue, as per the forum rules.

    Allan

  • eastofthesuneastofthesun Posts: 12Questions: 4Answers: 0

    hi allan

    the issue is the same as:

    https://datatables.net/release-datatables/extensions/FixedHeader/examples/zIndexes.html

    where the left column has lost its coloring...

    thanks in advance

This discussion has been closed.