Fixed Header width doesn't match parent width

Fixed Header width doesn't match parent width

UndalamarUndalamar Posts: 2Questions: 1Answers: 0

Link to test case: https://jsfiddle.net/tnm2db8g/ https://rsk-spb.com/catalog/opalubka/stenovaya/
Debugger code (debug.datatables.net): https://debug.datatables.net/ekuken
Description of problem: On site FixedHeader break <th> width, but in fiddle all works properly. What problem it could be?

Answers

  • allanallan Posts: 52,636Questions: 1Answers: 8,053 Site admin

    Different styles are being applied when the header is in its 'fixed' mode - on your page, if you scroll it so the header is fixed, you'll see that the table headers have left/right borders. That is all that is needed to break the layout!

    In your CSS you have

    .catalog__table table, .catalog__table td, table th {
        border: 0;
    }
    

    but you need to use:

    table.dataTable thead td,
    table.dataTable thead th {
        border: 0;
    }
    

    Allan

  • UndalamarUndalamar Posts: 2Questions: 1Answers: 0

    I've tried this, but nothing happens. Only borders dissapear, but width not calculate properly

Sign In or Register to comment.