How do you add box-shadow
to a CSS table row?
Adding box-shadow: 2px 2px 2px #888888
to the element table-row
in the code below does nothing and only works on the table
element or the table-cell
element:
.table {
display: table;
background-color: #ffffff;
}
.row {
display: table-row;
box-shadow: 2px 2px 2px #888888;
}
.cell {
display: table-cell;
width: 100px;
}
<div class="table">
<div class="row">
<div class="cell">
CELL 1
</div>
<div class="cell">
CELL 2
</div>
</div>
<div class="row">
<div class="cell">
CELL 3
</div>
<div class="cell">
CELL 4
</div>
</div>
</div>
https://jsfiddle.net/ev36d1mh/
However, I need each table-row
to have box-shadow: 2px 2px 2px #888888
and adding it to the table-cell
creates a shadow between the two cells. Eliminating the vertical shadowing is not an option.
So how can I add box-shadow: 2px 2px 2px #888888
to the entire row of a table?