• 0

[CSS] Table Row Hover <TR>


Question

I cant seem to get a table row to hover with the following code:

tr:hover{
	background:#4b95e5;
	}
tr:nth-child(odd) {
	background-color:#edf3fe;
	}
tr:nth-child(even) {
	background-color:#ffffff;
	}
tr:nth-child(odd:hover {
	background:#4b95e5;
	}
tr:nth-child(even)hover {
	background:#4b95e5;
	}

It also doesnt work with:

tr:hover{
	background:#4b95e5;
	}
tr:nth-child(odd) {
	background-color:#edf3fe;
	}
tr:nth-child(even) {
	background-color:#ffffff;
	}
tr:hover {
	background:#4b95e5;
	}

NVm I think I just see what i got wrong: this is correct!

tr:hover{
	background:#4b95e5;
	}
tr:nth-child(odd) {
	background-color:#edf3fe;
	}
tr:nth-child(even) {
	background-color:#ffffff;
	}
tr:nth-child(odd):hover {
	background:#4b95e5;
	}
tr:nth-child(even):hover {
	background:#4b95e5;
	}

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.