question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[2.0.3] Disable table row hover effect

See original GitHub issue

All tables with a class of table automatically receive a row hover effect.

Keeping in line with the other table features that Bootstrap offers, it would be great if this effect is not enabled by default. Perhaps a new row-hover class would be enable the feature.

At the very least it would be nice to have a class in Bootstrap that disables the hover effect.

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
mchioccacommented, Apr 30, 2012

I’m using a jQuery datatable implementation from http://www.datatables.net along with a ThemeRoller theme that includes a row hover effect that I like and wanted to keep.

When I upgraded to 2.0.3 the Bootstrap row hover took over, with a color that is not what I wanted. I found the row hover CSS and was able to override it.

.table tbody tr:hover td,
.table tbody tr:hover th {
    background-color: inherit;
}

Using inherit allowed the jQuery datatable row hover color to be used instead, which is the one that I wanted.

0reactions
skyriverbendcommented, Oct 18, 2012

For those still on 2.0, here’s a full code snippet for disabling table hover-over:

.table-disable-hover.table tbody tr:hover td,
.table-disable-hover.table tbody tr:hover th {
    background-color: inherit;
}
.table-disable-hover.table-striped tbody tr:nth-child(odd):hover td,
.table-disable-hover.table-striped tbody tr:nth-child(odd):hover th {
  background-color: #f9f9f9;
}

To use this snippet, just add the .table-disable-hover class to your table.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bootstrap hover table: disable hover efect on specific row
It's really simple, assign one class to all rows except that specific row on which you don't want the effect to take place....
Read more >
Disable hover color change / Retain table row color based on ...
Hello All,. Currently I am trying to keep the color retained in certain conditions, e.g. to show the row record as red when...
Read more >
Disable darker shade of grey while hovering over table rows
Is it possible to disable the hover effect in tables where it becomes a darker shade of grey while hovering with the mouse?...
Read more >
Disable Hover Highlighting in Child Row — DataTables forums
Inside the child row, I create a simple HTML table. However, this table is inheriting the hover highlighting style that the main table...
Read more >
table-hover - Bootstrap CSS class
You don't need to remember all CSS classes. Just use the Bootstrap Editor instead. Sass source. /* _tables.scss:88 */ .table- ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found