Jump to content
GreenSock

HDM

SplitText textAlign:"justify" no work

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi! 

 

I have a little problem with the property "textAlign", when i try to align "justify",no work, just with it, but the others aligns "center, left, right" works perfect.

 

Can you help me and told me what I am doing wrong?

 

Thanks!

See the Pen pJNqKY by Erika200892 (@Erika200892) on CodePen

Link to comment
Share on other sites

I'm pretty sure that's simply impossible. Sorry. There's no way we could effectively plot each character correctly (the way the browser does) for a text-align of "justify". I wish I had better news for you. 

Link to comment
Share on other sites

Hi HDM  :)

 

Jack is absolutely right , but seems there's a tricky way with adding a span tag  : 

See the Pen oXYmwp by MAW (@MAW) on CodePen

  • Like 4
Link to comment
Share on other sites

Ha ha. Nice, Diaco. Yeah, it could work for lines, but not for characters/words. 

  • Like 1
Link to comment
Share on other sites

Thanks a lot Jack and Diaco. 

 

This works perfect for me.  :-)

 

Grettings! 

Link to comment
Share on other sites

  • 1 year later...

Hello, is there a good news for this post ? Or it's always impossible for characters/words.

Link to comment
Share on other sites

Sorry, @CliCliC, I still can't imagine how that'd even be possible to accomplish (at least in some reasonable way). I wish I had a better answer for you. 

  • Like 1
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.
×