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?
I noticed that Datatables sometimes generates inline CSS (style=’….’). Is there are way to
Share
The most accurate answer would be: yes, the code can be changed to stop adding style=… to the html BUT removing all of them would almost certainly break the datatable layout and its behavior.
Datatable plugin uses
style="..."to set dynamic properties (like width, position) that (in most cases) cannot be determined before actually running the plugin. If they cannot be determined they cannot be styled beforehand using css classes so we end up in usingstyle="..."for those.