Datatable is not auto hidding columns when screen size is smaller

Datatable is not auto hidding columns when screen size is smaller

xgubianasxgubianas Posts: 1Questions: 1Answers: 0

Hi guys,

When I insert this datatable in this file is not hidding columns when I resize down screen and I don't know why...
File with issues is visedi.php
I have a lot of another files working (more simple files), and it works. Example attached pac.php file.

Thanks a lof if you could take a look and give me some ideas.

This is the code:

<div class="table-responsive m-t-10">
                                                                <table id="taula_medichabitual" class="taula_datatable_sub table display nowrap table-hover table-striped table-bordered font-light" cellspacing="0" width="100%">
                                                                    <thead>
                                                                        <tr>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_699']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_451']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_448']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_700']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_436']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_701']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_378']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_379']; ?></th>
                                                                            <th class="text-center" ><? echo $_SESSION['Trans_6']; ?></th>
                                                                        </tr>
                                                                    </thead>
                                                                    <tbody>
                                                                    <?php
                                                                        $sql_docs = "SELECT * FROM V_Medicacio_Habitual WHERE Id_Pacient = " . $row_vis["Id_Pacient"] . " ORDER BY Data_Fi ASC";
                                                                        $stmt_docs = $con->prepare($sql_docs);
                                                                        $stmt_docs->execute();
                                                                        while ($row_docs = $stmt_docs->fetch())
                                                                        {
                                                                            if ($row_docs['Medicament'] <>"0")
                                                                            {
                                                                                $Medicament = substr($row_docs['NomMedicament'],0,60);
                                                                            }
                                                                            else
                                                                            {
                                                                                $Medicament = $row_docs['Medicament2'];
                                                                            }

                                                                            if ($row_docs['Data_Fi']=="0000-00-00")
                                                                            {
                                                                                $Data_Fi = "";
                                                                            }
                                                                            else
                                                                            {
                                                                                $Data_Fi = date('d/m/y', strtotime($row_docs['Data_Fi']));
                                                                            }
                                                                            ?>
                                                                            <tr>
                                                                                <td class="align-middle text-center"><?php echo $Medicament; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs[$_SESSION['Idioma_Camp']."Via"]; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Dosi']; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Durada']; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Unitats']; ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Pauta']; ?></td>
                                                                                <td class="align-middle text-center"><?php echo date('d/m/y', strtotime($row_docs['Data_Inici'])); ?></td>
                                                                                <td class="align-middle text-center"><?php echo $Data_Fi ?></td>
                                                                                <td class="align-middle text-center"><?php echo $row_docs['Nom_Usuari']; ?></td>
                                                                            </tr>
                                                                    <?php } ?>
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                        </div>

Answers

This discussion has been closed.