Jump to content
Search Community

Text indent using Split Text

Nysh test
Moderator Tag

Recommended Posts

Hey @Nysh

 

What worked for me, was setting the span to  'display: inline-block' and also setting a width to it.

 

span.spacer {
  display: inline-block;
  width: 85px;
}

 

This way you also don't have to worry about how many empty characters you would have to fit inside the span. Just make sure, there is at least one.

 

<span class="spacer">&nbsp;</span>

 

 

See the Pen daa45d6aff0c7605a759ff5bec41f2bb by akapowl (@akapowl) on CodePen

 

 

 

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...