Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change font family in datatable

I'm a beginner in java, How can I change the font family of all texts (header, footer and body) in a datatable?

I found nothing about font family in datatables.jqueryui.css

like image 229
Hana Bzh Avatar asked Oct 31 '15 16:10

Hana Bzh


Video Answer


2 Answers

Thanks to @charlietfl,

I use inspect element in the browser and found out the solution is adding font-family and font-size to .dataTables_wrapper in dataTables.jqueryui.css

.dataTables_wrapper {
    font-family: tahoma;
    font-size: 13px;
    direction: rtl;
    position: relative;
    clear: both;
    *zoom: 1;
    zoom: 1;
}
like image 90
Hana Bzh Avatar answered Sep 20 '22 17:09

Hana Bzh


I have used the following implementation and works fine. By the way, in this example I am using Bootstrap and Ajax call.

<style>
  .table.dataTable  {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 13px;
}
</style>
<table id="example" class="table"></table>
like image 30
Alexandre Crivellaro Avatar answered Sep 23 '22 17:09

Alexandre Crivellaro