Comming from the base style, changed to bootstrap 5 and my rows doesn't have any style
Comming from the base style, changed to bootstrap 5 and my rows doesn't have any style
Dosorio
Posts: 3Questions: 2Answers: 0
I'm not an expert, so I'm kind lost here.
This is my base html links
<!-- Datatable script -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.11.4/js/jquery.dataTables.js" type="text/javascript" charset="utf8"></script>
<script src="https://cdn.datatables.net/1.11.4/js/dataTables.bootstrap5.min.js"></script>
<!-- Datatable css -->
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.4/css/dataTables.bootstrap5.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.1/css/bootstrap.min.css">
Also, I'm using Laravel 8
I'm missing something else?
<div class="card">
<div class="card-body">
<table id="packagesTable">
<thead>
<tr>
<th>ID</th>
<th>Etapa</th>
<th>Productor</th>
<th>Variedad</th>
<th>Bandejas</th>
<th>Fecha inicio</th>
<th>Fecha termino</th>
<th>Fecha registro</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
@foreach ($data as $key => $package)
the content
@endforeach
</tbody>
</table>
</div>
</div>
This question has an accepted answers - jump to answer
Answers
This is a recreatin of what i'm working with
http://live.datatables.net/soleparu/1/
@Dosorio It looks like the table is missing bootstrap classes.
taken from https://datatables.net/examples/styling/bootstrap5.html
Also you are missing css and js for bootstrap I think.
If you use the downloader ( https://datatables.net/download/index ) you can pick the plugins you want to include.
At the bottom you can uncheck the concatenate to get the itemized list of files needed. Here is a list of some of the essentials.
It's worth using the Download page, as you can choose all the extensions and styling you need, and the links/files are generated with dependencies in mind,
Colin