Transposed table is not aligned

Transposed table is not aligned

dianacpacdianacpac Posts: 1Questions: 1Answers: 0
edited February 2018 in Free community support

I transposed this table but now i can't make the two rows align.

This is the css that i used:

test thead { float: left; }

test thead th { display: block; }

test tbody { float: right; }

test tbody td { display: block; }

test th{ border: none; }

test td{ border: none; }

This is the js:

$(document).ready(function() {
$('#test').DataTable( {
"ordering": false,
"data": $scope.datatest,
"searching": false,
"paginate": false,
"info": false,
},
"columns": [
{ "data": "q" },
{ "data": "w" },
{ "data": "e" },
{ "data": "r" },
{ "data": "t" },
{ "data": "y" }
]
} ) ;
} ) ;

What am i missing?

Many Thanks

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    DataTables doesn't support transposing tables I'm afraid. As such that is outside the scope of the support I can provide. I'd suggest trying to get it working with a plain HTML table first and then add DataTables.

    Allan

  • edwardcedwardc Posts: 30Questions: 11Answers: 0

    Use CSS. See bellow a datatable with transpose. I believe it looks ok.
    For editor, use modal popup and the editor-launch button add it separately.

  • IntactoIntacto Posts: 4Questions: 0Answers: 0
    edited August 2018

    CSS transpose method (apply from second line until end of the table):
    <tr style="float:left;">

  • IntactoIntacto Posts: 4Questions: 0Answers: 0
    edited August 2018

    I have used the code below for show 3 rows as table with 3 columns
    <tr style="float:left; width:33.33%;">

This discussion has been closed.