You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue with table-striped overwriting table-active in Bootstrap can be resolved by increasing the specificity of the CSS selector for the table-active class.
One way to do this is to add a parent selector to the table-active class, which will make it more specific than the table-striped class. For example, you can add a class to the parent element of the table, and use that class as a selector for the table-active class.
Here is an example CSS code that shows how this can be done:
.my-table .table-active {
background-color: #f5c6cb;
}
In this code, .my-table is a parent class that is added to the parent element of the table. This makes the selector more specific than the .table-striped class, so the background color of the table-active elements will not be overwritten by the striping.
You can adjust the background-color value to the desired color for your active table rows.
By using a more specific selector, you can ensure that the active color is applied to every table row that has the table-active class, regardless of whether the table is striped or not.
I can take this issue to fix it
Hope i could help
Prerequisites
Describe the issue
Having a Striped table makes it so only every even element that is table-active shows the active colour.
Reduced test cases
https://codepen.io/alex-t-rorich/pen/MWPOxQP
What operating system(s) are you seeing the problem on?
Windows
What browser(s) are you seeing the problem on?
Chrome, Firefox
What version of Bootstrap are you using?
5.3
The text was updated successfully, but these errors were encountered: