Reputation: 9443
Im using xhtml2pdf to generate report in django and i would like to let one of my cells text display vertically but i couldn't make it using css.
Here is some attempt:
.vertical-text {
writing-mode: tb-rl;
}
<table>
<tbody>
<tr>
<td class="vertical-text" >V text</td>
</tr>
</tbody>
</table>
UPDATE
writing-mode
property is missing in the supported css properties. Is there any workaround?
Upvotes: 1
Views: 1665
Reputation: 5242
There is another work around, where we can use css: JSFiddle
.verical-text {
width:1px;
font-family: monospace;
white-space: pre-wrap; /* this is for displaying whitespaces including Firefox */
}
But, there are couple of downfall's here:
I would suggest use some other tool, where you would not be restricted with css properties like:
Upvotes: 2