How to add vertical text in an HTML table?

Spread the love

Sometimes, we want to add vertical text in an HTML table.

In this article, we’ll look at how to add vertical text in an HTML table.

How to add vertical text in an HTML table?

To add vertical text in an HTML table, we use the transform property.

For instance, we write

<div class="box-rotate">Lorem ipsum dolor sit amet.</div>

to add a div with text.

Then we write

.box-rotate {
  -webkit-transform: rotate(7.5deg);
  transform: rotate(7.5deg);
}

to rotate the text by 7.5 degrees with the transform property.

Conclusion

To add vertical text in an HTML table, we use the transform property.

Leave a Reply

Your email address will not be published. Required fields are marked *