Jump to content
Search Community

SplitText textAlign:"justify" no work

HDM
Moderator Tag

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

Posted

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.

Posted

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. 

Posted

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
Posted

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

  • Like 1
Posted

Thanks a lot Jack and Diaco. 

 

This works perfect for me.  :-)

 

Grettings! 

  • 1 year later...
Posted

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

Posted

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

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...