Bootstrap table striped: How do I change the stripe background colour?

drake035 picture drake035 · Dec 29, 2013 · Viewed 209.1k times · Source

With Bootstrap class table-striped, every other row in my table has a background colour equal to #F9F9F9. How can I change this colour?

Answer

kyriakos picture kyriakos · Dec 29, 2013

Add the following CSS style after loading Bootstrap:

.table-striped>tbody>tr:nth-child(odd)>td, 
.table-striped>tbody>tr:nth-child(odd)>th {
   background-color: red; // Choose your own color here
 }