Answer the question
In order to leave comments, you need to log in
How to make tr's box-shadow overlap the next tr in the table?
Hello.
In general, there is a table:
<table>
<thead>
<tr>
<th>One</th>
<th>Two</th>
<th>Three</th>
<th>Four</th>
<th>Five</th>
<th>Six</th>
<th>Seven</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
</tbody>
</table>
body {
margin: 0;
background: #eee;
}
table {
width: calc(100% - 40px);
margin: 40px 20px;
border-collapse: separate;
border-spacing: 0 10px;
}
table tbody tr {
cursor: pointer;
border-radius: 10px;
}
table tbody tr:hover {
box-shadow: 0 12px 10px 0 rgba(0,0,0,0.15);
}
table tbody tr td {
background-color: #fff;
padding: 10px 20px;
}
table tbody tr > td:first-child {
border-radius: 10px 0 0 10px;
}
table tbody tr > td:last-child {
border-radius: 0 10px 10px 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question