A contained default table is incorrectly styled.
A default table (w/out a class) inside of a table which is assigned class="table" is styled as if the contained table also had this class applied. I.e., instead of no styling whatsoever, it shows the TB styling.
This is a problem for our particular app where we want to display tabular data within a table row, and we don't want a second set of row lines, etc., displayed.
Code to reproduce the error:
<table class="table">
<tr>
<td>
<table>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>2</td>
<td>1</td>
</tr>
</table>
</td>
</tr>
</table>
I'm currently looking for a work-around — a way to display the inner table completely unstyled.
Could you make a new table class to negate the effects from the parent table?
Maybe. I actually realized, that since the borders were the only real problem for us, I just removed them with a style attribute on the contained td's.
Yeah, not something we will typically have to solve for the entire framework. Stick to modifying that on your own for now.
This problem is still causing issues for me. I am trying to remove hover on both the outer and the inner tables using :
.table tbody tr:hover td, .table tbody tr:hover th { background-color: transparent; }
.table-striped tbody tr:nth-child(odd):hover td, .table-striped tbody tr:nth-child(odd):hover th { background-color: #F9F9F9; }
However, when I hover over the cell that contains the inner table, the background color of the inner table changes.
Manually enforcing a background color such as the following does not work: .inner_table { background-color: blue; }