I am using JQuery Datatables Version 1.10.7 (both, the js and the css are referenced from my page), and want to apply a style to the (I want to make the font weight to normal).
But, when I write a css block for styling, it is not getting applied to the th. Could someone help me to convert the header to a normal weighted font. See the Start Date column. When I have explicitly mentioned the style tag in the th, and specified the font to be normal, that is getting rendered correctly.
Any help is appreciated!
Code Snippet:
$(document).ready(function() {
$('#example').dataTable();
} );
.mytableheader { background-color: #4B0082; border-bottom: 1px;
color: #fff; font-family: 'HelveticaNeue-Light', Helvetica, Arial; font-size: 16px; font-weight: normal; padding: 5px; text-align: left;}
.table { text-align: left; background: #fff; padding: 0px; margin: 0px;
font-family: 'HelveticaNeueW01-55Roma'; color: #000; border: 1px solid
#4B0082; border: 1px solid #ddd; border-bottom:px solid #ddd; border-spacing:
0px; font-family: 'HelveticaNeue-Light', Helvetica, Arial, sans-serif;
font-size: 14px; line-height: 1.3; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.datatables.net/1.10.7/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.7/css/jquery.dataTables.css">
<table id="example" class="stripe" cellspacing="0" width="100%">
<thead class="mytableheader">
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th style="font-weight:normal">Start date</th>
<th>Salary</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</tfoot>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011/04/25</td>
<td>$320,800</td>
</tr>
</tbody>
</table>