When I try and set the datatable width just the table main section is being resized , in attached image the red circled element should be aligned with main html table. :

To center the table I use : $("#myDataTable").css("width","80%"); but as you can see it just resizes the main table section, not the entire datatable.
datatables creates a wrapper element which has always the class
dataTables_wrapperso if you want to resize the table you should resize that elementif you have more than one table and you want to target a specific wrapper, the id of that wrapper is