How can I split rows to form a list divs?
How can I split rows to form a list divs?
katut
Posts: 2Questions: 1Answers: 0
I am using using Datatables to create a list of <divs> with a particular structure (already done). As expected the rows are tightly coupled I would like to have them seperated to have something like the following image. The rectangles will the individual rows of the table. So how can I split the rows?
This discussion has been closed.
Answers
Can you show me the markup you are creating please? I'm afraid I don't fully understand the question at the moment since DataTables is a table plug-in. Are your
div
s inside a table cell?Allan
Yes. Here is the semplified code (I am using Twig as the templating engine):
I then call Datatables on top of the table, here is JS code:
With the above code I get a one column table with individual cells containing my modified div. Something like this
What I would like to get is this:
What you've shown above is not valid HTML and is not something DataTables would accept. It expects only valid HTML.
Try moving the
<div class="container">
inside thetd
.Beyond that, I would suggest you try getting it working in a plain HTML table without DataTables and then enable DataTables on it.
Allan