css - Change individual column widths when using DataTables jQuery plugin -


i using datatables here. have made table database. want change width of each column in terms of percentage. relative code or example can me?

<table id="example" cellspacing="0" width="100%">     <thead>         <tr>             <th width="60%">name</th>             <th width="40%">position</th>         </tr>     </thead>      <tbody>         <tr>             <td width="60%">abc</td>             <td width="40%">def</td>         </tr>         <tr>             <td width="60%">xyz</td>             <td width="40%">zyx</td>         </tr>     </tbody> </table> 

according documentation can following:

$('#example').datatable( {   "columns": [     { "width": "60%" },     { "width": "40%" },   ] }); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -