I am attempting to create a vertical header using JavaScript, CSS, and HTML. However, I am facing an issue with the header height not dynamically adjusting. I believe there might be an error in how I am calling JSS.
Code :
<style>
table, tr, td, th {
border: 1px solid #000;
position: relative;
padding: 10px;
}
th span {
transform-origin: 0 50%;
transform: rotate(-90deg);
white-space: nowrap;
display: block;
position: absolute;
bottom: 0;
left: 50%;
}
</style>
<Script>
$(function() {
var header_height = 0;
$('table th span').each(function() {
if ($(this).outerWidth() > header_height) header_height =
$(this).outerWidth();
});
$('table th').height(header_height);
});
</script>
<html onload="function()">
<table>
<thead>
<tr>
<th><span>DATE</span></th>
<th><span>ACCOUNTNAME</span></th>
</tr>
</thead>
<tbody>
<tr>
<TD class=AltLight align=left height="17" width="10%">2017/10/20</TD>
<TD class=AltLight align=left height="17" width="10%">USA</TD>
</tr>
</tbody>
</table>
</html>
Desired Output
DATE ( Vertically Titled ) Account ( vertically Titled
20/10/2017 USA