Saturday, 15 March 2014

html - How can I change Bootstrap table-striped in a less specific way? -



html - How can I change Bootstrap table-striped in a less specific way? -

i want alter colors of bootstrap table-striped. have read question: bootstrap table striped: how alter strip background colour?. can alter with, example:

.table-striped > tbody > tr:nth-child(2n+1) > td, .table-striped > tbody > tr:nth-child(2n+1) > th { background-color: red; }

however, apps needs different color "selected row". have css class called "selectedrow" add together tr selected. property is:

.selectedrow td { background-color: blue; color: black; }

i need selected row, background color takes precedence on bootstrap table-stripped. is...for tr add together css class selectedrow want them blue, not red. note cannot utilize !important here (there reason this).

so there way can alter bootstrap table-striped selectedrow css class takes precedence?

you have more specific bootstrap styles.

for illustration this:

.table-striped>tbody>tr.selectedrow:nth-child(odd)>td, .table-striped>tbody>tr.selectedrow:nth-child(even)>td { background-color: #819bbf; color: black; }

i hope idea.

html css twitter-bootstrap

No comments:

Post a Comment