Can I force a table to render without a header?

Can I force a table to render without a header?

monkeyboymonkeyboy Posts: 60Questions: 19Answers: 0

I am stacking several tables on a page, and they share the same header (but different math)

This question has an accepted answers - jump to answer

Answers

  • ApezdrApezdr Posts: 43Questions: 4Answers: 5
    edited February 2017 Answer ✓

    You can use CSS for this i believe.

    Example:

    Table ID = DataTablesData

    CSS

    #DataTablesData thead {
        display: none;
    }
    

    I would just get the table name for the sub table, basically select the table you're referencing and possibly other tables.

    Got multiple?

    Example:

    Table 1 ID = DataTablesData
    Table 2 ID = DataTablesData2
    Table 3 ID = DataTablesData3

    CSS

    #DataTablesData2 thead, #DataTablesData3 thead {
        display: none;
    }
    

    If you don't anticipate adding more tables that you need to see headers for to the page, besides the one you could just do.

    table:nth-of-type(n+2) thead {
        display: none;
    }
    
  • monkeyboymonkeyboy Posts: 60Questions: 19Answers: 0

    You are the CSS king! Thanks! I was tryining to do it through the DOM in the datatable. CSS is clearly the right way!

This discussion has been closed.