newbie question? Can we use div instead of html table?

newbie question? Can we use div instead of html table?

cmanvacmanva Posts: 37Questions: 0Answers: 0
edited April 2011 in General
I just found this site and have a simple question about the software.
Under usage, it recommends using html table. I am working on a classic asp site that uses divs instead of html table. Will it work with divs? What would be the equivalent of the following:

[code]



Column 1
Column 2
etc




Row 1 Data 1
Row 1 Data 2
etc


Row 2 Data 1
Row 2 Data 2
etc


[/code]

Replies

  • cmanvacmanva Posts: 37Questions: 0Answers: 0
    I guess no?
  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    No I'm afraid not. The TABLE tag has semantic meaning and DataTables builds on that. The DIV tag is just a block level element and doesn't mean very much. DataTables takes this approach for reasons of progressive enhancement.

    One possible option if you can't format as a table is to use Javascript to read your DIV structure and create a table from it, which you then run DataTables on.

    Allan
This discussion has been closed.