bootstrap table hover code example

Example 1: bootstrap table

<table class="table">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">First</th>
      <th scope="col">Last</th>
      <th scope="col">Handle</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">1</th>
      <td>Mark</td>
      <td>Otto</td>
      <td>@mdo</td>
    </tr>
    <tr>
      <th scope="row">2</th>
      <td>Jacob</td>
      <td>Thornton</td>
      <td>@fat</td>
    </tr>
    <tr>
      <th scope="row">3</th>
      <td>Larry</td>
      <td>the Bird</td>
      <td>@twitter</td>
    </tr>
  </tbody>
</table>

Example 2: table bootstrap with scrool

<div style="height: 600px;overflow: scroll;">
<!-- change height to increase the number of visible row  -->
	<table></table>
</div>

Example 3: bootstrap table list

<table class="table table-bordered">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">First</th>
      <th scope="col">Last</th>
      <th scope="col">Handle</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">1</th>
      <td>Mark</td>
      <td>Otto</td>
      <td>@mdo</td>
    </tr>
    <tr>
      <th scope="row">2</th>
      <td>Jacob</td>
      <td>Thornton</td>
      <td>@fat</td>
    </tr>
    <tr>
      <th scope="row">3</th>
      <td colspan="2">Larry the Bird</td>
      <td>@twitter</td>
    </tr>
  </tbody>
</table>

Example 4: bootstrap table dense

<!-- BOOTSTRAP V3 -->
<table class="table table-condensed">
  ...
</table>
<!-- BOOTSTRAP v4 -->
<table class="table table-sm">
  ...
</table>

Example 5: bootstrap table

<table class="table">
 <thead>
 <tr>     <th>Head 1</th>	    <th>Head 2</th>      <th>Head 3</th>   </tr>
 </thead>
  
 <tbody>  
 <tr>      <td>cell</td>		  <td>cell</td>		 <td>cell</td>    </tr>
 <tr>      <td>cell</td>		  <td>cell</td>		 <td>cell</td>    </tr>
 </tbody>
  
 <tfoot>
 <tr>     <th>Footer 1</th> 	<th>Footer 2</th>	<th>Footer 3</th>	</tr>
 </tfoot>
</table>

Example 6: bootstrap table hover

<table class="table table-hover">
  <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">First</th>
      <th scope="col">Last</th>
      <th scope="col">Handle</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">1</th>
      <td>Mark</td>
      <td>Otto</td>
      <td>@mdo</td>
    </tr>
    <tr>
      <th scope="row">2</th>
      <td>Jacob</td>
      <td>Thornton</td>
      <td>@fat</td>
    </tr>
  </tbody>
</table>

Tags: