Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Datatable empty table text align changes on other devices

I've been working with datatables for a short period of time and I have this problem: I changes the empty table text for a table like:

language: { emptyTable: "No Requests"}

On the computer is aligned to left but the same text viewed from a tablet or from a phone becomes center align. I've tried to add something like:

language: { emptyTable: "No Requests", sClass: 'emptyT' }

and my CSS class:

.emptyT {
    text-align:left;
}

But the text alignment for empty table remains the same (left on computer but center for tablet and phone). Is there any way to make it remain aligned to left no matter the used device type?

like image 407
Dana Avatar asked Mar 22 '26 08:03

Dana


1 Answers

SOLUTION

Add the following CSS rule:

table.dataTable td.dataTables_empty {
    text-align: left;    
}

DEMO

See this jsFiddle for code and demonstration.

like image 94
Gyrocode.com Avatar answered Mar 23 '26 22:03

Gyrocode.com



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!