which is better to expand size of datatable either px or %
which is better to expand size of datatable either px or %
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
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