Bootstrap 4 and no-gutters
Bootstrap 4 and no-gutters

I've wrapped my datatable in a wrapper like so:
<div class="row no-gutters">
<div class="col-md-12">
...
</div>
</div>
but the generated table doesn't inherit the no-gutters class, so it expands out to the right and left (because of the negative margins on the row class).
How can I ensure that the datatable uses the .no-gutters class when it generates it's row wrappers?
This discussion has been closed.
Answers
I solved this with a workaround for now, but would really not have to do this all the time.
I changed my wrapper to be:
<div style="margin-left:15px; margin-right:15px;"> ... </div>
I can create a class for this, of course, but I would still have to add it around every datatable instance. I guess that's not too bad.
You would currently need to modify the
dom
property to add theno-gutters
class to therow
divs. Its a little bit of a pain as the BS4 string fordom
is really long, but it is possible.I'm working on making this easier for DT2.
Allan