DataTables Responsive element.style Issues

DataTables Responsive element.style Issues

majortom84majortom84 Posts: 3Questions: 2Answers: 1

Hello, I am trying to implement responsive table but it looks like when responsive: true is added to the javascript $('#table').DataTable() it is making some inline code element.style. This element.style is adding a width that is making the table not stretch all the way out on small to large conversion. Is there anything I can do to remove element.style?

This question has an accepted answers - jump to answer

Answers

  • majortom84majortom84 Posts: 3Questions: 2Answers: 1
    Answer ✓

    I fixed this by adding the following
    $("#table").addClass("width-100"); // add class to override element.style width

    In CSS
    .width-100{
    width: 100% !important;
    }

This discussion has been closed.