Bootstrap starter string set

How to make table row background change in Bootstrap 3 on hover. The table class I'm using now is table table-striped . I tried adding an extra class to the <tr> tags in the table and made css this way .table-row:hover{background:black;} . Now only lines without stripes work. Isn't there a class in bootstrap that will allow me to easily implement this? Or should I use JQuery to fix this? I really can't figure it out myself.

+45
twitter-bootstrap twitter-bootstrap-3 css-tables hover row
Dec 06 '13 at 0:27
source share
1 answer

You need to add the table-hover class to the <table/> element. Like this:

 <table class="table table-striped table-hover"> <tbody> <tr> <td>Col 1</td> <td>Col 2 </td> </tr> </tbody> </table> 

Source: Documentation

+107
Dec 06 '13 at 0:33
source share



All Articles