I have a html table, and the column widths are fixed. I have content in one column that needs to be rotated 270 degrees. The length of the content is dynamic and can vary. I have the code below, but the problem is when it rotates, firstly the width of the table cell expands and the height doesnt and as a result the content just goes upwards and disappears. And also it doesnt align to the bottom of the cell.
I would like the width of the cell to remain the fixed with that I have defined but the height needs to auto adjust. Here is a JSFiddle: https://jsfiddle.net/d7c4q924/1/
And here is the code I have currently:
<style type="text/css">
.container{
width:100%;
display: inline-block;
white-space: nowrap;
transform: rotate(270deg);
transform-origin: left top 0;
}
</style>
<table border="1" width="600px">
<tr>
<td width="100px">column1</td>
<td width="100px"><span class="container">this column has a dynamic length string</span></td>
<td width="100px">column3</td>
<td width="300px">column4</td>
</tr>
</table>