'How to fix the changing height of <td > in table?

I am fetching data from the database. While displaying the height of the table get changing. I want to fix it. That means it must not change height according to the database content.The height and width of the cell must be fixed.In this case width is fixed. But I am not getting how to fix height and it must not change it's height but it can change it's width.

 <?php
    include("C:\wamp64\www\DashBoard\Config2.php");
    echo '<DOCTYPE html>
            <head>
              </head>
                <section>
                  <body>';
                  function id($db,$p){
                    echo'<div class="tbl-header">
                      <table style="float: left; width:50% table-layout:fixed; height:50% padding:0px;" border="1" cellpadding="7"  >
                        <thead>
                           <tr>
                              <th colspan=5 style="width:15%">Testcase id</th>
                              <th colspan=5 style="width:70%">Testcase </th>

                           </tr>   
                        </thead>
                     </div>
            <div class="tbl-content"> 
              <tbody>';
                  $sql="select prefix, tc_id, tc_description from (select prefix ,tc_id ,SUBSTRING(tc_summary,4,25) as tc_description from executions1 join project_table on project_id=pro_id where pro_id=$p) as t;";  
                  $query=mysqli_query($db,$sql);
                   while($row = mysqli_fetch_array($query)){
                     echo '<tr>
                      <td colspan=5 style="width:15%">'.$row['prefix'].'-'.$row['tc_id'].'</td>
                      <td colspan=5 style="width:70%">'.$row['tc_description'].'</td>
                      </tr>';
                   }
              echo'</tbody>
             </div>
           </table>';
          }//id method ends
     echo'</body>
      </section> 
    </html>';
     $pro="select  count(project_name)from project_table;";
     $res=mysqli_query($db,$pro);
     $row=mysqli_fetch_array($res);
     $cntp=$row['count(project_name)'];

          for($p=1;$p<=$cntp;$p++){
                //displaying project id's
                id($db,$p);}
    ?>

Can anyone help me to solve this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source