JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <thead>
        <tr>
            <th><div><span>Címke</span></div></th>
            <th><div><span>Hosszabb címke</span></div></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>x</td>
            <td>x</td>       
        </tr>
    </tbody>
</table>

CSS

thead th {
    width:20px;
    white-space:nowrap;
    height:200px;
    background:green;
    text-align:left;
    position:relative;
}

thead div {
    width:20px;
    white-space:nowrap;
    height:200px;
    background:green;
    text-align:left;
    position:relative;   
}

thead th span {
  -webkit-transform: rotate(-90deg);  /* Chrome, Safari 3.1+ */
     -moz-transform: rotate(-90deg);  /* Firefox 3.5-15 */
      -ms-transform: rotate(-90deg);  /* IE 9 */
       -o-transform: rotate(-90deg);  /* Opera 10.50-12.00 */
          transform: rotate(-90deg);  /* Firefox 16+, IE 10+, Opera 12.10+ */
    background:red;
    display:block;
    position:absolute;
    left:50%;
    top:50%;
    height:20px;
    width:200px;
    margin:-10px -100px;
    text-align:left;
}