Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap table colspan rowspan issue

I would like to create my table to work like this: my desired table

I have tried the following code but it does not work:

<section class="signa-table-section clearfix">
   <div class="container">
      <div class="row">
         <div class="col-lg">
            <table class="table table-responsive table-bordered">
               <thead>
                  <tr>
                     <th>Entry</th>
                     <th>Sl</th>
                     <th colspan="3">Tp</th>
                     <th>Tp</th>
                  </tr>
               </thead>
               <tbody>
                  <tr>
                     <td>Mark</td>
                     <td>Otto</td>
                     <td>@mdo</td>
                     <td>Mark</td>
                     <td>Otto</td>
                  </tr>
                  <tr>
                     <td>Mark</td>
                     <td>Otto</td>
                     <td>@mdo</td>
                     <td>Mark</td>
                     <td>Otto</td>
                  </tr>
                  <tr>
                     <td>Mark</td>
                     <td>Otto</td>
                     <td>@mdo</td>
                     <td>Mark</td>
                     <td>Otto</td>
                  </tr>
               </tbody>
            </table>
         </div>
      </div>
   </div>
</section>
like image 475
webmarjan Avatar asked Nov 08 '22 15:11

webmarjan


1 Answers

Replace inside your <thead> by :

<tr>
   <th rowspan="2">Entry</th>
   <th rowspan="2">Sl</th>
   <th colspan="3">Tp</th>
</tr>
<tr>
   <th>Tp</th>
   <th>Tp</th>
   <th>Tp</th>
</tr>
like image 90
GGO Avatar answered Nov 15 '22 04:11

GGO