Bootstrap forcing table striping

后端 未结 1 1746
星月不相逢
星月不相逢 2021-01-26 03:42

I have a table inside of a table. On the outer table I want striping and borders, but on the inner one I don\'t. I did this.

1条回答
  •  无人共我
    2021-01-26 04:00

    According to the Bootstrap docs...

    "All table styles are inherited in Bootstrap 4, meaning any nested tables will be styled in the same manner as the parent."

    So in order to override the stripes on the nested table you'd have to add a little CSS...

    .table-nostriped tbody tr:nth-of-type(odd) {
      background-color:transparent;
    }
    
    

https://www.codeply.com/go/95b4ecfFP7

0 讨论(0)
提交回复
热议问题