Specifying a fixed column width in jQuery Datatables

http://stackoverflow.com/questions/25706537/specifying-a-fixed-column-width-in-jquery-datatables

HTML

<script src="//cdn.datatables.net/1.10.2/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="//cdn.datatables.net/1.10.2/css/jquery.dataTables.min.css">
<div class="forecastTableDiv">
  <table id="example">
    <thead>
      <tr>
        <th>Name</th>
        <th>Position</th>
        <th>Office</th>
        <th>Salary</th>
      </tr>
    </thead>
  </table>
</div>

CSS

#example {
  width: 1200px;
}

JavaScript

$('#example').DataTable({ //four column table
           autoWidth: false, //step 1
           columnDefs: [
              { width: '300px', targets: 0 }, //step 2, column 1 out of 4
              { width: '300px', targets: 1 }, //step 2, column 2 out of 4
              { width: '300px', targets: 2 }  //step 2, column 3 out of 4
           ]
        });