'Data width always gets style of 0px
Using Yajra with Bootstrap 4, I try to display the table like so:
<div class="row col-12 table-responsive">
{{ $myDataTable->table() }}
</div>
and set the parameters:
->parameters([
'processing' => false,
'serverSide' => true,
"paging" => false,
'buttons' => [],
But my table does not spread across the entire 12 columns, it gets very squeezed with style of 0px on the table tag: <table class="dataTable" style="0px">
How to get the table spread to the 12 columns?
Solution 1:[1]
Are you certain you have set everything up correctly? For starters, try using the following for your table classes:
<table class="datatable-table table">
Then make sure that you have imported the proper stylesheet/scripts through CDNs or by throwing them in your project. You'll at least need "datatables.css" and "datatables.js".
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | gowl |
