Important note:

This version is deprecated and will not be supported from 1 May 2018. A new version is available at https://stas-melnikov.ru/books/hctasks/tasks/highlighting-a-table-row-with-the-not-pseudo-class/

Highlighting a table row with the :not pseudo-class

Demo: https://codepen.io/melnik909/pen/KQLMPo

Task description

А friend of mine sent me his task again some days ago. He received the table component with some data on the job interview. In this component all rows became dull when you hover on any row:

He had to fix the code in order to make all rows dull except a hovered one:

You need to add :not() pseudoclass into .table__tbody:hover .table__tr selector to make CSS work for all non-hovered rows on the hover on a row in the table.

Why you need to support the project

I want to share my knowledge with you but creating posts takes a long time. Therefore I'm looking for subscribers who will financially support me. Your money will go towards the development of the HCTask project and creating my book about HTML and CSS. Together we can do it. Thank you!

PayPal: https://www.paypal.me/melnik909

results matching ""

    No results matching ""