<div class="table">
<div class="tableRow">
<div class="tableCell">One</div>
<div class="tableCell">Two</div>
<div class="tableCell">Three</div>
<div class="tableCell">Four</div>
<div class="tableCell"><a href="#link">Link</a></div>
<a class="tableRowLink" href="#1"></a>
</div>
<div class="tableRow">
<div class="tableCell">One</div>
<div class="tableCell">Two</div>
<div class="tableCell">Three</div>
<div class="tableCell">Four</div>
<div class="tableCell"><a href="#link">Link</a></div>
<a class="tableRowLink" href="#1"></a>
</div>
<div class="tableRow">
<div class="tableCell">One</div>
<div class="tableCell">Two</div>
<div class="tableCell">Three</div>
<div class="tableCell">Four</div>
<div class="tableCell"><a href="#link">Link</a></div>
<a class="tableRowLink" href="#1"></a>
</div>
</div>
body {
display: flex;
justify-content: center;
margin-top: 40px;
}
table {
border: 2px solid blueviolet;
border-collapse: collapse;
}
body {
display: flex;
justify-content: center;
margin-top: 20px;
color: #37559d;
}
a {
color: #5165ff;
}
.tableRow {
position: relative;
display: grid;
text-decoration: none;
color: inherit;
grid-template-columns: repeat(5, 70px);
place-items: center;
border: 2px solid #ccd2ff;
border-bottom: none;
&:hover,
&:focus {
background: #f2f3ff;
outline: none;
}
&:last-child {
border-bottom: 2px solid #ccd2ff;
}
& a:not(.tableRowLink) {
position: relative;
z-index: 1;
}
}
.tableCell {
padding: 18px;
border-right: 2px solid #ccd2ff;
&:last-of-type {
border-right: none;
}
}
.tableRowLink {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.