Header line gone when data exist

Header line gone when data exist

ravhiravhi Posts: 2Questions: 1Answers: 0

Hello, I don't know if it's bug or somethings.

But the line are gone when the table is fill with the data, it's kind of annoying to look like that,
here is the pict before and after :

Header with empty data :

Header after the data is filled :

Thank you, and if this is not bug, how to fix that?

Answers

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,769

    Not sure I understand the problem you are trying to fix. What you have circled in red are the sorting arrows. Do you not want them displayed? Do you want sorting disabled?

    The first screenshot looks to show a Datatable initialized without data and with all of the features removed, like search, page length, etc. Is this how it is generated?

    Can you post a link to your page or a test case replicating the issue? This way we can have a better idea of what you are doing.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • ravhiravhi Posts: 2Questions: 1Answers: 0

    The vertical line on last row at header is gone when data exist on the table

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,769

    I see, I replicated the issue for you here:
    http://live.datatables.net/bezoqeda/1/edit

    Does look like a CSS issue. @allan or @colin can take a look at the test case to debug the issue.

    Kevin

  • allanallan Posts: 61,726Questions: 1Answers: 10,109 Site admin

    Thanks Kevin!

    It is indeed a bug in the stylesheet. This is the one causing the problem:

    table.table-bordered.dataTable th:last-child,
    

    The intention there is to stop the double width border on the last column.

    Here is a little workaround for the moment:

    table.table-bordered {
      border-right-width: 0;
    }
    table.table-bordered.dataTable th:last-child,
    table.table-bordered.dataTable td:last-child {
      border-right-width: 1px;
    }
    

    http://live.datatables.net/bezoqeda/2/edit

    Thanks for spotting that.

This discussion has been closed.