I noticed that Datatables sometimes generates inline CSS (style='....'). Is there are way to remove them? Or at least make the code not add styles inline?
There are a few options in DataTables to turn off the element.style
that generates with a table's generation. I've found that setting bAutoWidth : false
can sometimes turn off all of the inline styles, (even though it's just meant to turn off the inline width option), as well as initializing the table outside of $(document).ready(function()
.
As for a single option to turn off all styles created by DataTables - I'm not sure there's a way to do that, but if someone else finds this old thread, try these two options and see if it fixes your problem!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With