How to change the font family of datatables export buttons
How to change the font family of datatables export buttons
dk1301
Posts: 3Questions: 1Answers: 0
In my website I have implemented the datatables export buttons. However since my website has custom fonts I'd like to know
how one can change the font-family of the export buttons. I tried by adding in my main.css file
.dt-button {
font-family: MyFontCapital;
src: url('../font/MyFontCapital.otf');
}
or
.dt-button-collection{
font-family: MyFontCapital;
src: url('../font/MyFontCapital.otf');
}
but neither worked. I also searched the datatables site but didn't find any example that font-family is set during datatable initialization. Any idea what I should do?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
It isn't - using CSS is the correct way to do it.
Can you link to your page so I can take a look and try to help debug it please?
Allan
Hi Allan,
unfortunatelly both the website and the fonts are going to be used for a commercial app so I cannot link my page. I just want to add that the main.css has the following font settings:
What else can I try from CSS point of view ? Sorry for the inconvenience.
I've just tried this with a Google web font:
It seems to work as expected.
Allan
Hi again and thanks for you help. It worked perfectly. It seems that the src command created the problem.