'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
Solution 1:[1]
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;
}
Solution 2:[2]
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>
Solution 3:[3]
Font-family for everything inside the DataTable area (header, table, footer).
CSS
.dataTables_wrapper { font-family: "courier"}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Hana Bzh |
| Solution 2 | Alexandre Crivellaro |
| Solution 3 | burak isik |
