i have template provides functionality of jquery datatables. not able scroll table horizontally. when add columns don't come in view
below html code
<h3>trainer deletion</h3> <div class="table-responsive"> <table id="example-datatable" class=" table-condensed table-bordered"> <thead> <tr> <th></th> <th>trainer id</th> <th>name</th> <th>gender</th> <th>age</th> <th>description</th> <th>primary mobile number</th> <th>secondary number</th> <th>base city</th> <th>base location</th> <th>work location</th> <th>education</th> <th>trainer since</th> <th>id proof</th> <th>certificates</th> <th>email</th> <th>email verify</th> <th>not available on</th> <th>style</th> </tr> </thead> <tbody> <?php include("db.php"); $sql="select * trainer"; $result=mysqli_query($conn, $sql); ?> <?php while($row=mysqli_fetch_array($result)) { ?> <tr> <td class="text-center"><?php echo"<input type='checkbox' name=id[] value='$row[trainer_id]'>"; ?></td> <td class="text-center"><?php echo"$row[trainer_id]";?></td> <td class="text-center"><?php echo"$row[name]";?></td> <td class="text-center"><?php echo">$row[gender]";?></td> <td class="text-center"><?php echo"$row[age]";?></td> <td class="text-center"><?php echo"$row[description]";?></td> <td class="text-center"><?php echo"$row[primary_mobile_number]";?></td> <td class="text-center"><?php echo"$row[secondary_number]";?></td> <td class="text-center"><?php echo"$row[base_city]";?></td> <td class="text-center"><?php echo"$row[base_location]";?></td> <td class="text-center"><?php echo"$row[work_location]";?></td> <td class="text-center"><?php echo"$row[education]";?></td> <td class="text-center"><?php echo"$row[trainer_since]";?></td> <td class="text-center"><?php echo"$row[id_proof]";?></td> <td class="text-center"><?php echo"$row[certificates]";?></td> <td class="text-center"><?php echo"$row[email]";?></td> <td class="text-center"><?php echo"$row[email_verify]";?></td> <td class="text-center"><?php echo"$row[not_available_on]";?></td> <td class="text-center"><?php echo"$row[style]";?></td> </tr> <?php } ?> </tbody> </table> </div> below screen shot

if add:
style="overflow-x:auto;" to
<div style="overflow-x:auto;" class="table-responsive"> that show allow scroll when overlap container.
Comments
Post a Comment