Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create table inside another table in bootstrap

How to create a table inside another table in Bootstrap-3. I tried but it displays after the first table.

like image 559
Dhivakar Avatar asked Jul 10 '14 10:07

Dhivakar


1 Answers

You need to do as below

<table class="table table-bordered">
  <th colspan="3">Outer Table</th>
  <tr>
    <td>This is row one, column 1</td>
    <td>This is row one, column 2</td>
    <td>
     <table class="table table-bordered">
       <th colspan="3">Inner Table</th>
       <tr>
         <td>This is row one, column 1</td>
         <td>This is row one, column 2</td>
         <td>This is row one, column 3</td>
       </tr>
     </table>
    </td>
  </tr>
</table>

Demo : http://jsbin.com/qilebevo/1/

like image 167
Nishant Srivastava Avatar answered Sep 21 '22 08:09

Nishant Srivastava