which is better to expand size of datatable either px or %

which is better to expand size of datatable either px or %

swapnils@msoft.co.inswapnils@msoft.co.in Posts: 3Questions: 3Answers: 0

the code i m using is:
var dataTable = $('#mytable').dataTable({
"order": [[2, "asc"]],
"destroy": true,
"aaData": result,
"scrollX": true,
"aoColumns": [
{"sTitle": "Event Id", "sWidth": "150px"},
{"sTitle": "Event Name", "sWidth": "150px"},
{"sTitle": "Event Date Time", "sWidth": "200px"},
{"sTitle": "Duration", "sWidth": "150px"},
{"sTitle": "Location", "sWidth": "150px"}
]
}).wrap("

");

Answers

  • allanallan Posts: 61,920Questions: 1Answers: 10,153 Site admin

    I'd say % normally. Trying to get a pixel perfect table is just a waste of time imho - the browser has so many rules that can override your values.

    Allan

This discussion has been closed.