In twitter-bootstrap-3 is there any way you can use a built in bootstrap color scheme? This code wouldn’t work, and I have tried “Active” and “Success” for colors instead of background-color
, but they didn’t work.
<table class="table table-bordered background-color: white">
<thead>
<tr>
<th>example table</th>
</tr>
</thead>
</table>
2
Answers
Bootstrap has some built in Contextual backgrounds which can be added to any element
Also, you’re code example doesn’t work because you’re adding css in the
class
attribute vs thestyle
attribute.. should look like this insteadyou can use
.table-striped
class, that makes zebra style.OR
if you want more than 2 colors you can use Contextual classes, which you can apply to
tr
ortd