Does anyone have a solution for controlling the rotation of a div using CSS?
I've been grappling with this issue for some time now, but I can't seem to find a proper fix. Whenever I try to rotate a div within a table cell, the width of the cell goes haywire, depending on the length of the text inside.
Currently, I'm stuck with the code below, although I've experimented with other methods as well.
My goal is to decrease the width of the left cell and adjust it according to the font, creating more space.
This is what my CSS looks like:
.rotate {
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
writing-mode: lr-tb;
}
And here's the HTML I'm working with:
<table class="TABELLA1" width="400px" align="left">
<tr height="90px">
<td width="1%">
<p id="idcliente" class="A8BL rotate">C</p>
</td>
<td width="99%">
<div>
<div class="A8BL">
FACTORY 1<br>
253190 MILANO (IT)<br>
</div>
<div class="A8L">
Tel. 02 669172284<br>
e-mail: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7f161119103f1e130a191e101551160b">[email protected]</a>
Cod. Fisc. <br>
e Partita IVA 2251364245341126
</div>
</div>
</td>
</tr>
</table>