CSS box-shadow on table rows - tr
- doesn't seem to be working consistently across browsers. On some browsers the shadow is displayed; on others, there is no shadow.
I'm using the following CSS:
tr {
background-color: rgb(165, 182, 229);
box-shadow: 0px 2px 2px black;
-moz-box-shadow: 0px 2px 2px black;
-webkit-box-shadow: 0px 2px 2px black;
}
td, th {
padding: 5px;
text-align: left;
}
Here is a jsFiddle of the below snippet:
tr {
background-color: rgb(165, 182, 229);
box-shadow: 0px 2px 2px black;
-moz-box-shadow: 0px 2px 2px black, ;
-webkit-box-shadow: 0px 2px 2px black;
}
td, th {
padding: 5px;
text-align: left;
}
<table>
<tr>
<td> </td>
<th>One</th>
<th>Two</th>
</tr>
<tr>
<th>Title</th>
<td>Three</td>
<td>Four</td>
</tr>
<tr>
<th>Title2</th>
<td>Five</td>
<td>Six</td>
</tr>
<tr>
<th>Title3</th>
<td>Seven</td>
<td>Eight</td>
</tr>
<tr>
<th>Title4</th>
<td>Nine</td>
<td>Ten</td>
</tr>
</table>
Note: The same behavior is observed when substituting <tr>
with <div>
and adding display: table-row
.
td:hover { display:block; }
changes the location of text in the table cell and slightly increases the size of the hovered table column and row. – Goddamned