CSS Line around vertically oriented text

82 Views Asked by At

I want to implement a text with a line around it: ------------ TEXT ------------

As it is explained here: CSS technique for a horizontal line with words in the middle

But i need it to be vertically oriented as it would be by setting

writing-mode: vertical-rl;
text-orientation: mixed;

How would I achieve this?

1

There are 1 best solutions below

0
On BEST ANSWER

Try this instead,

span:after,span:before{
  content:"\00a0\00a0\00a0\00a0\00a0";
  text-decoration:line-through;
}
h2{
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin:0;
}
<h2><span>vertically</span></h2>