-2

I would like to add two extra spaces between the words TITLE and THE. So the word-spacing or text-indentation CSS property will not work here. Any advice to achieve my goal? Thank you.

.c1::after{
content:"SUB TITLE THE EXAMPLE";
position:absolute;
display:block;
font-size:.395em;
letter-spacing:.125em;}
<div class ="c1" style="display:flex; justify-content:center;"> 
   <h4>HELLO STACKOVERFLOW</h4></div>
Josh
  • 33
  • 5

1 Answers1

2

You can use \00a0 instead of spaces in the content property. They don't get collapsed into a single space.

.c1::after{
    content: "SUB TITLE\00a0\00a0THE EXAMPLE";
}
MrSandyWilly
  • 388
  • 1
  • 3
  • 14