I have come across a unique issue that I cannot find a solution for on Stack Overflow or anywhere else. I am creating a comparison chart and need the <th>
text to be rotated 270 degrees with zebra-striping on even columns. The problem is that while the <td>
s fill the background area perfectly, the rotated <th>
s only fill the background behind the text. I have tried setting the height to 100% as suggested by other examples, but it did not work. Adding width of 100% throws off the entire table. I am looking for a simple solution to this problem. Thank you in advance for any recommendations.
Update: Here are the relevant styles being applied to the rotated th
:
th.headertext {
-ms-transform: rotate(270deg);
-webkit-transform: rotate(270deg);
transform: rotate(270deg);
text-align: left;
bottom: 56px;
position: relative;
}
td:nth-child(even), th:nth-child(even) {
background-color: #efefef;
}
th {
font-size: 16px;
font-weight: bold;
height: 100%;
line-height: 100%;
}
td, th {
text-align: center;
border-bottom: solid 1px #ccc;
font-size: 12px;
padding: 6px;
word-wrap: break-word;
}