This a table that created with CSS Grid Layout, but I have a problem with it, I can't make hover state on each row.
I only want use CSS for this.
Can anyone give me a solution for this?
.table {
display: grid;
grid-template-columns: [col-start] auto [col-end];
grid-template-rows: [header-start] 50px [header-end row-start] auto [row-end];
grid-auto-rows: auto;
grid-auto-columns: auto;
grid-gap: 1px;
}
.table>* {
background: gray;
padding: 10px;
}
.heading {
background: navy;
color: #fff;
grid-row: header;
}
<div class="table">
<div class="heading">Title 1</div>
<div class="heading">Title 2</div>
<div class="heading">Title 3</div>
<div class="heading">Title 4</div>
<div class="heading">Title 5</div>
<div class="row">Row 1</div>
<div class="row">Row 1</div>
<div class="row">Row 1</div>
<div class="row">Row 1</div>
<div class="row">Row 1</div>
<div class="row">Row 2</div>
<div class="row">Row 2</div>
<div class="row">Row 2</div>
<div class="row">Row 2</div>
<div class="row">Row 2</div>
<div class="row">Row 3</div>
<div class="row">Row 3</div>
<div class="row">Row 3</div>
<div class="row">Row 3</div>
<div class="row">Row 3</div>
</div>