Extra padding/height for concatenated data

Extra padding/height for concatenated data

c0mm4ndc0mm4nd Posts: 2Questions: 1Answers: 0

so am using DataTables to display some data from an SQLite3 database all seems fine except that there is extra padding for all the data that has been concatenated

the problem seem to be a certain inline-style added to the main div during run-time (min-height: 1895px;).
the problem is fixed when i display all the data that has been fetched
Please help if you have an idea how i can solve this
thank you

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    Hi @c0mm4nd ,

    CSS issues are hard to diagnose without seeing them. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • c0mm4ndc0mm4nd Posts: 2Questions: 1Answers: 0

    thank you for your reply @colin

    <div class="right_col" role="main">
                <div class="clearfix"></div>
    
                <div class="row">              
    
                  <div class="col-md-12 col-sm-12 col-xs-12">
                    <div class="x_panel">
                      <div class="x_content">
                        <table id="datatable-buttons" class="table table-striped table-bordered">
                          <thead>
                            <tr>
                              <th>S/No</th>
                              <th>Fullname</th>
                              <th>Age</th>
                              <th>Admitted on</th>
                              <th>Father</th>
                              <th>Father's Phone</th>
                            </tr>
                          </thead>
                         <tbody>
                            <?php
                              $count=1;
                              $query = "SELECT * FROM students_bio_data ORDER BY sn ASC LIMIT 50";
                              $result = $connect->query($query);
                              while ($row = $result->fetcharray(SQLITE3_ASSOC)) {?>
                              <tr>
                                <td><?php echo $count; ?></td>
                                <td><a href="details.php"><?php echo $row["s_name"].' '.$row["f_name"].' '.$row["o_name"]?></a></td>
                                <?php $a = new DateTime($row["date_of_birth"]); $b = new DateTime('today');?>
                                <td><?php echo $a->diff($b)->y;?></td>
                                <td><?php echo $row["date_of_admission"]?></td>
                                <td><?php echo $row["fathers_name"]?></td>
                                <td><?php echo $row["fathers_number"]?></td>
                              </tr>
                            <?php $count++; }?>
                          </tbody>
                          <div class="clearfix"></div>
                        </table>
                      </div>
                    </div>
                  </div>
          </div>
      </div>
    

    this is the code for the table, when i run this it adds styling to the first div making it

    <div class="right_col" role="main" style = min-height: 1895px;>
    

    thank you

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    Could you create a fiddle with the code running, please. The instructions are in the message above.

    C

This discussion has been closed.