Hana Bzh
Hana Bzh

Reputation: 2260

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

Upvotes: 6

Views: 49014

Answers (3)

burak isik
burak isik

Reputation: 571

Font-family for everything inside the DataTable area (header, table, footer).

CSS

.dataTables_wrapper { font-family: "courier"}

Upvotes: 0

Alexandre Crivellaro
Alexandre Crivellaro

Reputation: 893

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>

Upvotes: 1

Hana Bzh
Hana Bzh

Reputation: 2260

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;
}

Upvotes: 16

Related Questions